How to MAKE JUMPSCARES in Roblox Studio!

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.พ. 2025
  • How to MAKE JUMPSCARES in Roblox Studio!
    🛠 This is How to MAKE JUMPSCARES in Roblox Studio! Thanks so much for watching, hope you guys have a great day! Subscribe 😎🛠
    🕸️Website: rustysillyband...
    😎Subscribe: www.youtube.co...
    💬Discord: / discord
    🌴Roblox Group: www.roblox.com...
    👑Rusty Merch: www.roblox.com...
    ⌚Timed Chapters:
    0:00 Intro
    0:50 Jump Scare Box
    2:31 Animation
    4:25 Scripting
    11:12 Testing
    11:30 Outro
    📝Tags:
    #roblox #robloxstudio #gamedevelopment #robloxstudioscripting #robloxstudiotutorial #lua #robloxhorror #robloxhorrorgames
    ❓What is Roblox Studio?
    🔎Roblox Studio lets you create anything and release with one click to smartphones, tablets, desktops, consoles, and virtual reality devices.
    ❓Who am I?
    🔎I am a Roblox Studio Tutorial TH-camr that you should Subscribe to :)

ความคิดเห็น • 124

  • @reverb9994L
    @reverb9994L 6 หลายเดือนก่อน +15

    if you want a sound to play:
    1. go to the toolbox and find a jumpscare sound you like
    2. add it under the script and name it "JumpscareSound"
    3. open the Jumpscare script
    4. under the long local tween line of code, add this:
    local sound = script.JumpscareSound
    sound:Play()

    • @davealdrindeloso2797
      @davealdrindeloso2797 4 หลายเดือนก่อน

      (Please tell me bro's online)
      For some reason it plays if you just join the literal game
      I put the code before the end is there something wrong?

    • @EpikFrenchToastYT
      @EpikFrenchToastYT 2 หลายเดือนก่อน +1

      Or, you can make a part have a sound in it, give it a sound, name it "Jumpscare", and insert a script with this:
      local part = workspace:WaitForChild("SoundBrick") -- Change "Part" to the name of your part
      local sound = part:WaitForChild("Jumpscare") -- Make sure you use the name of the sound in the part
      -- Function that listens for when the player dies
      local function onPlayerDeath(player)
      -- Check if the character has a humanoid and is dead
      local character = player.Character
      if character then
      local humanoid = character:FindFirstChild("Humanoid")
      if humanoid and humanoid.Health == 0 then
      -- Play the sound when the player dies
      sound:Play()
      end
      end
      end
      -- Listen for when a player dies
      game.Players.PlayerAdded:Connect(function(player)
      player.CharacterAdded:Connect(function(character)
      local humanoid = character:WaitForChild("Humanoid")
      -- Connect to the Humanoid.Died event
      humanoid.Died:Connect(function()
      onPlayerDeath(player)
      end)
      end)
      end)

  • @the_endermanelio
    @the_endermanelio 10 หลายเดือนก่อน +37

    Script for the lazy pals:
    --{SERVICES}--
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    --{VARIABLES}--
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.HorrorMonster
    --{FUNCTIONS}--
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation2):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0) + (rig.Head.CFrame.LookVector * 3)), rig.Head.Position))

    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1 Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()

    task.wait(1000)
    currentCamera.CameraType = Enum.CameraType.Custom

    end
    character.Humanoid.Died:Connect(onDeath)

  • @GC-ih8zk
    @GC-ih8zk 10 หลายเดือนก่อน +3

    Thank you for these kind of videos

  • @InkVerseEdits
    @InkVerseEdits 10 หลายเดือนก่อน

    very useful, you deserve more attraction to your channel.

  • @Artificial-Idiocy-Studios
    @Artificial-Idiocy-Studios 15 วันที่ผ่านมา

    my animation included moving of head and arms of monster but for some reason only the head is moving and so the jumscare looks rly bad. how do i fix this?

  • @BrodyPlayzz
    @BrodyPlayzz 7 หลายเดือนก่อน +1

    Thank you so much you make things so simple

  • @mistercheese2471
    @mistercheese2471 7 หลายเดือนก่อน +2

    It doesn't work when I touch the entity but the jumpscare will repeat every time I die tho it wont dissaper. Got any clues?
    edit: now it disapper after 4 seconds but still when I Touch the entity it doesn't work and it shows either one frame of the animation or the end

  • @goldenplague
    @goldenplague 10 หลายเดือนก่อน

    Can you make a daily reward system tutorial? Btw your editing is too good. Good job rusty.

  • @MerryChristmasChannel_R1
    @MerryChristmasChannel_R1 10 หลายเดือนก่อน +3

    i need this for my horror game thanks! (Rate: 10/10)

  • @БравыйГеймер
    @БравыйГеймер 7 หลายเดือนก่อน

    Thanks bro! Helped a lot!

  • @DaOnlyTomatoDude
    @DaOnlyTomatoDude 10 หลายเดือนก่อน

    thanks so much! i needed this for my horror game

  • @davealdrindeloso2797
    @davealdrindeloso2797 5 หลายเดือนก่อน

    When I click the publish animation
    it pops up but no save button?
    Its literally roblox's so bad ui man
    :(

  • @constantplot3305
    @constantplot3305 10 หลายเดือนก่อน

    thanks alot ive been trying to find a tutorial on how to make a jumpscare for a while now but how do i make it so a sound plays when the jumpscare is triggerd

    • @rustysillyband
      @rustysillyband  10 หลายเดือนก่อน +1

      Oh man, I forgot to add that to the tutorial! Sorry about that! To add a sound to the jumpscare, you can simply play it using this function:
      local sound = script.Sound
      sound:Play()
      Just make sure you put the sound:Play() function in the onDeath function and you put a sound inside of the local script named "Sound".
      Thank you so much for watching, have an amazing day!

    • @StevanBunic
      @StevanBunic 10 หลายเดือนก่อน

      @@rustysillyband but where should i exactly put that script im kinda confused

    • @rustysillyband
      @rustysillyband  10 หลายเดือนก่อน

      ​@@StevanBunicHi there! You should have a local script from the tutorial with a function inside of it named "onDeath". Inside of that function, you can use the code I provided and it doesn't really matter exactly where you put it in that function. Thanks for watching, have an amazing day!

    • @Rip_Samurai-tk8qj
      @Rip_Samurai-tk8qj 7 หลายเดือนก่อน

      @rustysillyband Can you make a tutorial cause i still dont understand how to add sound

  • @SantinoBatman330
    @SantinoBatman330 8 หลายเดือนก่อน

    Very good thanks man

  • @WhoisRblx
    @WhoisRblx 9 หลายเดือนก่อน +1

    I have a problem the animation doesn’t play and when I die again the jump scare doesn’t pop up can someone help

    • @Greenbirdgamedevs
      @Greenbirdgamedevs 9 หลายเดือนก่อน

      Make sure that everything is spelled correctly.
      Make sure that there are no errors in your script.

  • @KeatonClubb
    @KeatonClubb 8 หลายเดือนก่อน

    Could you make a video on working with the players camera, and mostly on locking the players camera on a part so they cant look around?

  • @Novaledud
    @Novaledud หลายเดือนก่อน +1

    can sum1 pls help i am not respawning but other than that the animation plays fine
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.JumpscareBot
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation)
    local function resetCameraAndRespawn()
    currentCamera.CameraType = Enum.CameraType.Custom
    player:LoadCharacter()
    end
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(rig.Head.Position + Vector3.new(-2.1, -2.8, 6.1) + (rig.Head.CFrame.LookVector * 3), rig.Head.Position)
    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()
    task.wait(5.25)
    resetCameraAndRespawn()
    end
    character.Humanoid.Died:Connect(function()
    animationTrack:Play()
    onDeath()
    end)

    • @davisossik
      @davisossik 5 วันที่ผ่านมา

      Same.Did u fix that?

    • @Novaledud
      @Novaledud 5 วันที่ผ่านมา

      @davisossik nope

    • @davisossik
      @davisossik 5 วันที่ผ่านมา

      @@Novaledud u need to change tim to 2.7 or 2.8,it will work

    • @davisossik
      @davisossik 5 วันที่ผ่านมา

      @@Novaledud *time

  • @posydeon2954
    @posydeon2954 10 หลายเดือนก่อน +4

    Help me please :Animation is not a valid member of LocalScript "Workspace.Poatato15.Jumpscare" - Client - Jumpscare:13 here is my script
    --{{Services}}--
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    --{{Variables}}--
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.Rig
    --{{Functions}}--
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0))+(rig.Head.CFrame.LookVector * 3)), rig.Head.Position)

    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()

    task.wait(5)
    currentCamera.CameraType = Enum.CameraType.Custom
    end
    character.Humanoid.Died:Connect(onDeath)

    • @TheHumanEditor
      @TheHumanEditor 9 หลายเดือนก่อน +1

      Maybe you forgot to add the animation inside the local script? Or you named it wrong.

    • @Conicloll
      @Conicloll 7 หลายเดือนก่อน

      Yeah maybe that

    • @Novaledud
      @Novaledud 2 หลายเดือนก่อน

      local Players = game:GetService("Players")
      local TweenService = game:GetService("TweenService")
      local ReplicatedStorage = game:GetService("ReplicatedStorage")
      local player = Players.LocalPlayer
      local character = player.Character or player.CharacterAdded:Wait()
      local currentCamera = game.Workspace.CurrentCamera
      local rig = game.Workspace.JumpscareBox.Rig
      -- Make sure the animation is placed in ReplicatedStorage or adjust the path
      local jumpscareAnimation = ReplicatedStorage:WaitForChild("JumpscareAnimation")
      -- Load and play the animation
      local animationTrack = rig.Humanoid:LoadAnimation(jumpscareAnimation)
      animationTrack:Play()
      -- Function to handle camera movement and transition on death
      local function onDeath()
      -- Change the camera type to scriptable to allow custom control
      currentCamera.CameraType = Enum.CameraType.Scriptable

      -- Position the camera behind the rig's head with an offset
      local cameraOffset = rig.Head.CFrame.LookVector * -3 -- Camera placed behind the rig's head
      local cameraPosition = rig.Head.Position + cameraOffset + Vector3.new(0, 1, 0)

      -- Set the camera's CFrame to the new position, looking at the rig's head
      currentCamera.CFrame = CFrame.new(cameraPosition, rig.Head.Position)

      -- Create a smooth tween to slowly move the camera towards the rig's head
      local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 0, false)
      local tweenGoal = {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5}
      local tween = TweenService:Create(currentCamera, tweenInfo, tweenGoal)
      tween:Play()
      -- Wait for the tween to complete, then revert camera to default
      task.wait(5)
      currentCamera.CameraType = Enum.CameraType.Custom
      end
      -- Connect the death event to trigger the camera effect
      character.Humanoid.Died:Connect(function()
      -- Play the jumpscare animation on death
      animationTrack:Play()
      -- Trigger the camera change
      onDeath()
      end)

  • @Inky-r7o
    @Inky-r7o หลายเดือนก่อน

    1:33 "hold shift to select all of them hold shift to select all of them
    " bro rlly said it twice lol

  • @Splatmast12
    @Splatmast12 5 หลายเดือนก่อน

    does anyone know what's wrong with my code, i spelled it right and there's no errors but the animation doesn't play
    {{Services}}
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    {{Variables}}
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.Sigma
    {{Functions}}
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 0, 0))+(rig.Head.CFrame.LookVector * 3)), rig.Head.Position)
    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()
    task.wait(3)
    currentCamera.CameraType = Enum.CameraType.Custom
    end
    character.Humanoid.Died:Connect(onDeath)

  • @ZackStanton-y1f
    @ZackStanton-y1f 4 หลายเดือนก่อน

    On line 18 my current camera has an error but the rest dont, no line of code has errors, all my spelling is right so can u tell me why

  • @infinity_gaming1600
    @infinity_gaming1600 7 หลายเดือนก่อน +1

    --{{Services}}--
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    --{{Variables}}--
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rake = game.Workspace.JumpscareBox.Rake
    --{{Functions}}--
    local animationTrack = rake.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation)
    animationTrack:Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rake.Head.CFrame + (rake.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rake.Head.Position + Vector3.new(0, 1, 0)) + (rake.Head.CFrame.LookVector * 3)), rake.Head.Position)
    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()
    task.wait(5)
    currentCamera.CameraType = Enum.CameraType.Custom
    end
    local function onCharacterAdded(newCharacter)
    character = newCharacter
    character.Humanoid.Died:Connect(onDeath)
    currentCamera.CameraType = Enum.CameraType.Custom -- Reset camera when respawning
    end
    player.CharacterAdded:Connect(onCharacterAdded)
    -- Initial connection
    if character then
    character.Humanoid.Died:Connect(onDeath)
    end
    --{{Services}}--
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    --{{Variables}}--
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rake = game.Workspace.JumpscareBox.Rake
    --{{Functions}}--
    local animationTrack = rake.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation)
    animationTrack:Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rake.Head.CFrame + (rake.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rake.Head.Position + Vector3.new(0, 1, 0)) + (rake.Head.CFrame.LookVector * 3)), rake.Head.Position)
    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()
    task.wait(5)
    currentCamera.CameraType = Enum.CameraType.Custom
    end
    local function onCharacterAdded(newCharacter)
    character = newCharacter
    character.Humanoid.Died:Connect(onDeath)
    currentCamera.CameraType = Enum.CameraType.Custom -- Reset camera when respawning
    end
    player.CharacterAdded:Connect(onCharacterAdded)
    -- Initial connection
    if character then
    character.Humanoid.Died:Connect(onDeath)
    end
    heres my script and everytime i die the camera is stuck on jumpscre box

  • @Voitis5
    @Voitis5 3 หลายเดือนก่อน

    the functions has a script error can anyone help?

  • @darkenmc
    @darkenmc 6 หลายเดือนก่อน +3

    I heard something in the background 10:05

    • @lmcd24
      @lmcd24 5 หลายเดือนก่อน +1

      his dog i think

  • @Bomber44-m4f
    @Bomber44-m4f 29 วันที่ผ่านมา +2

    Wow. It don’t work, what a waste of time

  • @Roblox.Bro_
    @Roblox.Bro_ 8 หลายเดือนก่อน

    tysm but i want to make a horror game where a random person in the lobby is the killer and different maps like piggy could u pleasse make a tut for that!

    • @YupLeditz
      @YupLeditz 4 หลายเดือนก่อน

      BRO LEARN SCRIPTING STOP ASKING FOR TUTORIALS

  • @PedroSilvaNunez-i1l
    @PedroSilvaNunez-i1l 2 หลายเดือนก่อน

    You Didn't mencion the animationtrack on the script

  • @-stars.and.raindrops-
    @-stars.and.raindrops- 6 หลายเดือนก่อน +1

    Help! My animation isn’t playing if the code is correct

    • @ShadowCodez-yk6wj
      @ShadowCodez-yk6wj 6 หลายเดือนก่อน +2

      delete the :Play() part at the end of the animation track then write animationTrack:Play() below the tween:Play()
      hope this helps

    • @-stars.and.raindrops-
      @-stars.and.raindrops- 6 หลายเดือนก่อน

      Thx

    • @ShadowCodez-yk6wj
      @ShadowCodez-yk6wj 6 หลายเดือนก่อน

      @@-stars.and.raindrops- No problem!

    • @rasheedgibbs9573
      @rasheedgibbs9573 6 หลายเดือนก่อน

      @@ShadowCodez-yk6wj Thanks, was wondering why the animation was playing whenever I spawned

    • @ShadowCodez-yk6wj
      @ShadowCodez-yk6wj 6 หลายเดือนก่อน

      @@rasheedgibbs9573 yea no problem!

  • @AnakinSkywalker.Vader.
    @AnakinSkywalker.Vader. 8 หลายเดือนก่อน

    THANK YOU

  • @everytime-v8g
    @everytime-v8g 10 หลายเดือนก่อน

    Thnxx

  • @Spoon1-x7u
    @Spoon1-x7u 2 หลายเดือนก่อน

    it didnt work when i die by the monster it doesnt work

  • @AnakinSkywalker.Vader.
    @AnakinSkywalker.Vader. 8 หลายเดือนก่อน

    how do I add a sound effect to make the monster more scary?

  • @WYSH-CATMELON
    @WYSH-CATMELON 8 หลายเดือนก่อน +14

    NOOOOO WHY DOESNT IT WORK FOR ME I WASTED FRICKIN 1 HOUR FOR THISSSSS

    • @TortillaPerson
      @TortillaPerson 6 หลายเดือนก่อน

      me too buddy, I understand

    • @slime_tie
      @slime_tie 5 หลายเดือนก่อน

      --{{ SERVICES }}--
      local Players = game:GetService("Players")
      local TweenService = game:GetService("TweenService")
      --{{ VARIABLES }}--
      local player = Players.LocalPlayer
      local character = player.Character or player.CharacterAdded:Wait()
      local currentCamera = game.Workspace.CurrentCamera
      local rig = game.Workspace.JumpscareBox.HorrorMonster
      --{{ FUNCTIONS }}--
      local function playAnimation()
      local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation)
      animationTrack:Play()
      end
      local function resetCamera()
      -- Ensure the camera is back to following the player
      task.wait(1) -- Reduced wait time from 3 seconds to 2 seconds
      currentCamera.CameraType = Enum.CameraType.Custom
      currentCamera.CameraSubject = character:WaitForChild("Humanoid")
      -- Lock the camera to first-person view
      player.CameraMode = Enum.CameraMode.LockFirstPerson
      currentCamera.FieldOfView = 70 -- Reset FOV to default for first-person view
      end
      local function onDeath()
      -- Play the jumpscare animation
      playAnimation()
      -- Set the camera to scriptable mode and position it
      currentCamera.CameraType = Enum.CameraType.Scriptable
      currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
      currentCamera.CFrame = CFrame.lookAt((rig.Head.Position + Vector3.new(0, 1, 0) + rig.Head.CFrame.LookVector * 3), rig.Head.Position)
      -- Create a tween to move the camera slightly
      local tween = TweenService:Create(
      currentCamera,
      TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true),
      {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5}
      )
      tween:Play()
      -- Wait for the tween to finish
      tween.Completed:Wait()
      -- Reset the camera back to the player
      resetCamera()
      end
      local function onCharacterAdded(newCharacter)
      -- Update the character reference when the player respawns
      character = newCharacter
      -- Reset the camera type just in case it's still in scriptable mode
      resetCamera()
      -- Connect the onDeath function to the character's death event
      character.Humanoid.Died:Connect(onDeath)
      end
      -- Connect the onCharacterAdded function to handle respawning
      player.CharacterAdded:Connect(onCharacterAdded)
      -- Initial setup when the script runs for the first time
      onCharacterAdded(character) , make sure you change the monster in your game and your jumscare rig to HorrorMonster and it should work

    • @JAYLENVR
      @JAYLENVR 3 หลายเดือนก่อน +1

      -{SERVICES}-
      local Players = game:GetService("Players")
      local TweenService = game:GetService("TweenService")
      -{VARIABLES}-
      local player = Players.LocalPlayer
      local character = player.Character or player.CharacterAdded:Wait()
      local currentCamera = game.Workspace.CurrentCamera
      local rig = game.Workspace.JumpscareBox.HorrorMonster
      -{FUNCTIONS}-
      local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation2):Play()
      local function onDeath()
      currentCamera.CameraType = Enum.CameraType.Scriptable
      currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
      currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0) + (rig.Head.CFrame.LookVector * 3)), rig.Head.Position))

      local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1 Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
      tween:Play()

      task.wait(1000)
      currentCamera.CameraType = Enum.CameraType.Custom

      end
      character.Humanoid.Died:Connect(onDeath)

    • @originallyDANO
      @originallyDANO 22 วันที่ผ่านมา

      same

  • @TheRedguyTm
    @TheRedguyTm 10 หลายเดือนก่อน

    Nice ❤🎉

  • @ChezzieCz
    @ChezzieCz 10 หลายเดือนก่อน

    Mine isn't working.. can you help?

  • @BrodyPlayzz
    @BrodyPlayzz 7 หลายเดือนก่อน

    Giys if it’s a big monster do 25 that’s what I did with mine

  • @CVRmonke
    @CVRmonke 7 หลายเดือนก่อน

    for some reason id didnt work i did everything right but it failed

  • @InfinityGamezzz
    @InfinityGamezzz 3 หลายเดือนก่อน +1

    4:07

  • @infinity_gaming1600
    @infinity_gaming1600 7 หลายเดือนก่อน

    model?

  • @ash6roly
    @ash6roly หลายเดือนก่อน

    tysm its working but anim is not playing(i fixed)

    • @LLLuminance
      @LLLuminance หลายเดือนก่อน

      How did you fix it?

  • @TheRealRoosterXD
    @TheRealRoosterXD 3 หลายเดือนก่อน

    script for lazy people
    This one works
    -{SERVICES}-
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    -{VARIABLES}-
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.JumpscareMan
    -{FUNCTIONS}-
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0) + (rig.Head.CFrame.LookVector * 3)), rig.Head.Position))
    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1 Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()
    task.wait(1000)
    currentCamera.CameraType = Enum.CameraType.Custom
    end
    character.Humanoid.Died:Connect(onDeath)

  • @vurray11
    @vurray11 2 หลายเดือนก่อน

    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.HorrorMonster
    -- Ensure the animation track is properly loaded and played
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation2)
    animationTrack:Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)

    -- Fix CFrame.lookAt usage by correctly passing the position and target
    currentCamera.CFrame = CFrame.lookAt(
    rig.Head.Position + Vector3.new(0, 1, 0) + (rig.Head.CFrame.LookVector * 3),
    rig.Head.Position
    )
    -- Create and play a tween with correct parameters
    local tween = TweenService:Create(
    currentCamera,
    TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true),
    {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5}
    )
    tween:Play()
    -- Wait for the tween to finish before resetting camera
    task.wait(1) -- Adjusted wait time to match the tween duration
    currentCamera.CameraType = Enum.CameraType.Custom
    end
    -- Connect the onDeath function to the humanoid's Died event
    character.Humanoid.Died:Connect(onDeath)
    gfuys fixed version

  • @TaulantKopsaj
    @TaulantKopsaj 10 หลายเดือนก่อน

    it doesnt work and i made sure i typed all the code right, do you know why?

    • @rustysillyband
      @rustysillyband  10 หลายเดือนก่อน +1

      Hi there! There could be a multiple of reasons that stop it from working. Try these:
      1. Make sure that everything is spelled correctly.
      2. Make sure that there are no errors in your script.

  • @SonicTheHedgehog1-u7l
    @SonicTheHedgehog1-u7l 7 หลายเดือนก่อน

    it didnt work 😪😪😪😪

  • @unboxing7972
    @unboxing7972 9 หลายเดือนก่อน

    It only works one time please help

  • @Abyssal_Vortex
    @Abyssal_Vortex 6 หลายเดือนก่อน

    GUYS ASK ME IF NEED HELP ILL GIVE SCRIPTS AND STUFF ALSO IF ANIMATION OR THE THING DOES POP UP MAKE SURE THE ANIMATION IS INSIDE OF "Jumpscare" and call the animaion "JumpscareAnimation" and call the jumpscare box "JumpscareBox" and make sure ur dummy is called "HorrorMonster" ask me for help!

    • @Abyssal_Vortex
      @Abyssal_Vortex 6 หลายเดือนก่อน

      the script for "Pathfindingscript" is
      --{{ SERVICES }}--
      local Players = game:GetService("Players")
      local PathfindingService = game:GetService("PathfindingService")
      --{{ VARIABLES }}--
      local rig = script.Parent
      local animations = script.Animations
      --{{ FUNCTIONS }}--
      local function checkForCharacter(character)
      local rayOrigin = rig:FindFirstChild("HumanoidRootPart").Position
      local rayDirection = (character.HumanoidRootPart.Position - rayOrigin).Unit * 40

      local raycastResult = workspace:Raycast(rayOrigin, rayDirection, RaycastParams.new())

      if raycastResult then
      local raycastInstance = raycastResult.Instance
      if raycastInstance:IsDescendantOf(character) then
      return true
      end
      else
      return false
      end
      end
      local function findNearestPlayer()
      local players = Players:GetPlayers()
      local nearestPlayer = nil
      local maxDistance = 63

      for _, player in pairs(players) do
      if player.Character ~= nil then
      local targetCharacter = player.Character
      local distance = (rig.HumanoidRootPart.Position - targetCharacter.HumanoidRootPart.Position).Magnitude

      if distance < maxDistance and checkForCharacter(targetCharacter) then
      nearestPlayer = targetCharacter
      maxDistance = distance
      end
      end
      end
      return nearestPlayer
      end
      local function attack(character)
      local distance = (rig.HumanoidRootPart.Position - character.HumanoidRootPart.Position).Magnitude

      if distance > 4 then
      rig.Humanoid:MoveTo(character.HumanoidRootPart.Position)
      else
      local attackAnimation = rig.Humanoid.Animator:LoadAnimation(animations.Attack)
      attackAnimation:Play()
      character.Humanoid.Health = 0
      end
      end
      local function calculatePath(destination)
      local agentParams = {
      ["AgentHeight"] = 5.5,
      ["AgentRadius"] = 4,
      ["AgentCanJump"] = false
      }

      local path = PathfindingService:CreatePath(agentParams)
      path:ComputeAsync(rig.HumanoidRootPart.Position, destination)
      return path
      end
      local function walkToDestination(destination)
      local path = calculatePath(destination)

      if path.Status == Enum.PathStatus.Success then
      for _, waypoint in pairs(path:GetWaypoints()) do
      local nearestPlayer = findNearestPlayer()
      if nearestPlayer then
      attack(nearestPlayer)
      break
      else
      rig.Humanoid:MoveTo(waypoint.Position)
      rig.Humanoid.MoveToFinished:Wait()
      end
      end
      else
      rig.Humanoid:MoveTo(destination - (rig.HumanoidRootPart.CFrame.LookVector * 10))
      end
      end
      local function patrol()
      local waypoints = workspace.Waypoints:GetChildren()
      local randomNumber = math.random(1, #waypoints)

      local walkAnimation = rig.Humanoid.Animator:LoadAnimation(animations.Walk)
      walkAnimation:Play()

      walkToDestination(waypoints[randomNumber].Position)
      end
      while task.wait(1) do
      patrol()
      end

    • @Abyssal_Vortex
      @Abyssal_Vortex 6 หลายเดือนก่อน

      make a localscript (Name the local script Jumpscare" inside of "StarterCharacterScripts" also put a animation inside of LocalScript and name the animation name "JumpscareAnimation" the script for the Jumpscare is
      --{{ SERVICES }}--
      local Players = game:GetService("Players")
      local TweenService = game:GetService("TweenService")
      --{{ VARIABLES }}--
      local player = Players.LocalPlayer
      local character = player.Character or player.CharacterAdded:Wait()
      local currentCamera = game.Workspace.CurrentCamera
      local rig = game.Workspace.JumpscareBox.HorrorMonster
      --{{ FUNCTIONS }}--
      local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation):Play()
      local function onDeath()
      currentCamera.CameraType = Enum.CameraType.Scriptable
      currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
      currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0)) + (rig.Head.CFrame.LookVector * 3)), rig.Head.Position)

      local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
      tween:Play()

      task.wait(3)
      currentCamera.CameraType = Enum.CameraType.Custom

      end
      character.Humanoid.Died:Connect(onDeath)

    • @LLLuminance
      @LLLuminance หลายเดือนก่อน

      what do you mean dummy? is it your avatar or the monster?

    • @LLLuminance
      @LLLuminance หลายเดือนก่อน

      @@Abyssal_Vortex do you have to die from the monster for the jumpscare to activate or can you just reset

  • @StevanBunic
    @StevanBunic 10 หลายเดือนก่อน

    How do i add sound when i get jumpscared?

    • @ShadowCodez-yk6wj
      @ShadowCodez-yk6wj 6 หลายเดือนก่อน

      add a sound into the jumpscare box monster the under the tween:Play() write: SoundName:Play()

  • @polloscappatodicasapolloid4493
    @polloscappatodicasapolloid4493 7 หลายเดือนก่อน

    Help!!!
    My animation plays exactly after 5 seconds the player died and the camera changed position, how can I delete this waiting time or make it shorter?
    I checked the animation and it's starting on the "0" second bar.
    My script:
    -{{Services}}-
    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    -{{Variables}}-
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.GranpaModel
    local sound = game.Workspace.JumpscareBox.JumpscareSound2
    -{{Functions}}-
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 0, 0))+(rig.Head.CFrame.LookVector * 3)), rig.Head.Position)
    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()
    task.wait(5)
    currentCamera.CameraType = Enum.CameraType.Custom

    end
    character.Humanoid.Died:Connect(onDeath)
    Thx for helping

    • @Steam_Artem
      @Steam_Artem 7 หลายเดือนก่อน

      task.wait(seconds you want to wait)

  • @senseiorochi3446
    @senseiorochi3446 2 หลายเดือนก่อน

    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    -{VARIABLES}-
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.HorrorMonster
    -{FUNCTIONS}-
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation2):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0) + (rig.Head.CFrame.LookVector * 3)), rig.Head.Position))

    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1 Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()

    task.wait(1000)
    currentCamera.CameraType = Enum.CameraType.Custom

    end
    character.Humanoid.Died:Connect(onDeath)

  • @Zaytrixxx
    @Zaytrixxx 18 วันที่ผ่านมา

    doesnt work tho

  • @OzzieDYT
    @OzzieDYT 10 หลายเดือนก่อน

    mines not working

  • @LiLPBJ
    @LiLPBJ 8 หลายเดือนก่อน

    Please add the script in the discription 😭😭

  • @ArtexRL
    @ArtexRL 9 หลายเดือนก่อน

    To not forget wheere i am - 6:42

  • @OfficalSinisterAgent
    @OfficalSinisterAgent 14 วันที่ผ่านมา

    it is not working

  • @gabrielfut2
    @gabrielfut2 10 หลายเดือนก่อน

    I wish I found your channel earlier !

  • @J3susL0vessU
    @J3susL0vessU 5 หลายเดือนก่อน

    Bro its not working

  • @Atomytx
    @Atomytx 10 หลายเดือนก่อน

    Free model?

    • @rustysillyband
      @rustysillyband  10 หลายเดือนก่อน

      You can find the free model in the description. Thanks for watching, have an amazing day!

    • @Atomytx
      @Atomytx 10 หลายเดือนก่อน

      @@rustysillyband thx!

    • @the_endermanelio
      @the_endermanelio 10 หลายเดือนก่อน

      @@rustysillyband I cant find the free model

    • @Atomytx
      @Atomytx 5 หลายเดือนก่อน

      I can find the model ​@@rustysillyband

  • @CREEFPUFT
    @CREEFPUFT 5 หลายเดือนก่อน

    I got it

  • @elir079
    @elir079 4 หลายเดือนก่อน

    OMG LIER I TOOK THIS SO HARD

  • @Fangzarie
    @Fangzarie 9 หลายเดือนก่อน

    hey love the previous tutorial and this one is pretty simple to follow but I keep getting an error when I run the game. Everything is spelled correctly and yet I keep getting this error
    jumpscareAnim is not a valid member of LocalScript "Workspace.RitaMomentine.jumpscare" - Client - jumpscare:13
    Any clue why?

    • @rustysillyband
      @rustysillyband  9 หลายเดือนก่อน +1

      It might be that the Jumpscare animation is taking too long to load in, so the script ends up running before the animation is there technically. To fix this, write: "local animation = script:WaitForChild("Animation") -- Change 'Animation' to the name of your animation.
      Thanks for watching, have a great day!

    • @Fangzarie
      @Fangzarie 9 หลายเดือนก่อน

      @@rustysillyband Yes! I think that was exactly what the problem now! The script works flawlessly! Thank you again so much, hopefully I can make a really neat animation to go with this haha!

  • @kaapeli_tv37
    @kaapeli_tv37 7 หลายเดือนก่อน +1

    bad tutorial!

    • @Teamlegend990
      @Teamlegend990 4 หลายเดือนก่อน

      man shut yo ass up

  • @TellyKennedy-ji2yp
    @TellyKennedy-ji2yp 2 วันที่ผ่านมา

    local Players = game:GetService("Players")
    local TweenService = game:GetService("TweenService")
    local player = Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local currentCamera = game.Workspace.CurrentCamera
    local rig = game.Workspace.JumpscareBox.HorrorMonster
    -{FUNCTIONS}-
    local animationTrack = rig.Humanoid.Animator:LoadAnimation(script.JumpscareAnimation2):Play()
    local function onDeath()
    currentCamera.CameraType = Enum.CameraType.Scriptable
    currentCamera.CFrame = rig.Head.CFrame + (rig.Head.CFrame.LookVector * 3)
    currentCamera.CFrame = CFrame.lookAt(((rig.Head.Position + Vector3.new(0, 1, 0) + (rig.Head.CFrame.LookVector * 3)), rig.Head.Position))

    local tween = TweenService:Create(currentCamera, TweenInfo.new(0.1 Enum.EasingStyle.Linear, Enum.EasingDirection.InOut, 13, true), {CFrame = currentCamera.CFrame + currentCamera.CFrame.LookVector * 0.5})
    tween:Play()

    task.wait(1000)
    currentCamera.CameraType = Enum.CameraType.Custom

    end
    character.Humanoid.Died:Connect(onDeath)