Shake script works in Studio but not on a published game, how do I fix this? Do I put it in a local script or? Also how would I make it so only the players in the area(inside of the non-collidable brick)are the players who are affected by the camera shake.
Could I use : while true do repeat
to check if there are players inside the brick? Then the function is pulled of? HELP! D:
function onClicked() local camera = game.Workspace.CurrentCamera local c = 1.5 wait(1.2) for i = 1,10 do wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-c*2,0,1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(c,0,0) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-c,c,-c) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(c,c,0) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-c,0,c) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,-c,0) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-c,c,-c) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(.1,-.1,c) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-.1,0,-.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-c,.1,-.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-.1,c,.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(.1,-.1,.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(c,0,-c) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-.1,.1,-.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(c,.1,-c) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(c,-.1,.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-.1,0,-.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(.1,0,-.1) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(-c,0,c) c = c / 1.5 end end script.Parent.ClickDetector.MouseClick:connect(onClicked)