It works fine in Solo mode but when I try and play it normaly it will not work? Any help? My script is a normal script. Thanks! :) Credit will be given at my game :)
function shake() local camera = game.Workspace.CurrentCamera for i = 1,10 do wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,2,0) wait() camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,-2,0) end end while true do wait(0.01) shake() end
A player's camera can only be manipulated by a LocalScript. The reason it worked in solo mode with a "normal script" is due to the fact that everything is locally loaded in that test mode.
Simply put the contents of the script into a LocalScript and place it somewhere within the player, such as their PlayerGui (via StarterGui).