So basically, I'm trying to disable a shake script after 3 seconds for an Order 66. The ShakeScript is a while true function, and I'm trying to get it to end after 3 seconds.
local players = game.Players:GetPlayers()
for i=1, #players do
local character = players[i].Character
local shakescript = character:FindFirstChild("ShakeScript")
if shakescript ~= nil then
shakescript.Disabled = false
end
end
game.Workspace.ShakeScriptAdder.ShakeScript.Disabled=false
wait(3)
game.Workspace.ShakescriptAdder.ShakeScript.Disabled = true
local players = game.Players:GetPlayers()
for i=1, #players do
local character = players[i].Character
local shakescript = character:FindFirstChild("ShakeScript")
if shakescript ~= nil then
shakescript.Disabled = true
end
end
This is the Shake Script if you need it.
while true do
local cam = workspace.CurrentCamera
cam.CFrame=cam.CFrame*CFrame.Angles(math.random(-3,3)/360,math.random(-3,3)/360,math.random(-3,3)/360)
cam.FieldOfView=math.random(69,71)
wait()
end
(There is another script that just distributes the ShakeScripts into each player. It works, it just wont stop.)

1 comment
Oh god wow, it worked. Thanks! I'll try to remember that next time.