The script only works if I test the game through Run. When im testing in game through Play
Script (ServerScript not LocalScript)
local hum = script.Parent:WaitForChild("ColdBloodedKiller")
while wait() do
local humanim = hum:LoadAnimation(script.Parent:FindFirstChildOfClass("Animation"))
if game.Workspace.MonitorOpening.Scared.Value == true then
game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable
game.Workspace.Camera.CFrame = game.Workspace.MonitorOpening.CFrame
script.Parent:SetPrimaryPartCFrame(game.Workspace.BonnieScreamer.CFrame)
game.Workspace.Jumpscare:Play()
humanim:Play()
wait(100)
end
end
Just remove the second wait, it probably makes it slower.
local hum = script.Parent:WaitForChild("ColdBloodedKiller")
while task.wait() do
local humanim = hum:LoadAnimation(script.Parent:FindFirstChildOfClass("Animation"))
if game.Workspace.MonitorOpening.Scared.Value == true then
game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable
game.Workspace.Camera.CFrame = game.Workspace.MonitorOpening.CFrame
script.Parent:SetPrimaryPartCFrame(game.Workspace.BonnieScreamer.CFrame)
game.Workspace.Jumpscare:Play()
humanim:Play()
end
end
Nope. When im testing game through Run, the camera works and the jumpscare works. If i’m remove second wait he start loop jumpscare sound and animation so fast.