Advertisement
Anukun_Lucifer

JumpScareScript

Jan 10th, 2025
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | Gaming | 0 0
  1. local CurrentCam = game.Workspace.CurrentCamera
  2. local JumpscareEvent = game.ReplicatedStorage:WaitForChild("JumpscareEvent")
  3.  
  4. local JumpscareCam = game.Workspace.JumpScare:WaitForChild("Camera")
  5. local Monster = game.Workspace.JumpScare:WaitForChild("Monster")
  6.  
  7. local Anim = Monster:WaitForChild("Humanoid"):WaitForChild("Animation")
  8. local AnimTrack = Monster:WaitForChild("Humanoid"):LoadAnimation(Anim)
  9.  
  10. JumpscareEvent.OnClientEvent:Connect(function(hit)
  11.  
  12.     CurrentCam.CameraType = Enum.CameraType.Scriptable
  13.     CurrentCam.CFrame = JumpscareCam.CFrame
  14.  
  15.     AnimTrack:Play()
  16.     script.Sound:Play()
  17.  
  18.     wait(3)
  19.  
  20.     local humanoid = hit.Parent:FindFirstChild("Humanoid")
  21.     humanoid.Health = 0
  22.  
  23.     CurrentCam.CameraType = Enum.CameraType.Custom
  24. end)
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement