Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Camera shaking script only working in studio, any suggestions?

Asked by
Miztix 0
9 years ago

Any fixes so it would work in online mode?

function shake()
    local camera = game.Workspace.CurrentCamera
    for i = 1,10 do 
        wait()
        camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,0.5,0)
        wait()
        camera.CoordinateFrame = camera.CoordinateFrame * CFrame.new(0,-0.5,0)
    end 
end 

while true do 
    wait(0.01)
    shake()
end 
0
My guess is you put this in a server Script. Only LocalScripts can access the camera. Perci1 4988 — 9y
0
I've put it into a LocalScript Miztix 0 — 9y
0
Where is the localscript? Goulstem 8144 — 9y
0
workspace Miztix 0 — 9y
0
LocalScripts only work in the player, you could put this in startergui or something. parkderp1 105 — 9y

Answer this question