p = game.Players.LocalPlayer
c = p.Character
ShakeForHowLong = 100000000 --Shake for 10 seconds.
magnitude = 1 --How much it shakes; can be set to any number or decimal or fraction.
TimePassed = 0 --Ignore
game:GetService("RunService").RenderStepped:connect(function (s)
if TimePassed < ShakeForHowLong then
c.Humanoid.CameraOffset = Vector3.new(magnitude*(math.random()*2 - 1),0,magnitude*(math.random()*2 - 1))
else
c.Humanoid.CameraOffset = Vector3.new(0,0,0)
return
end
TimePassed = TimePassed + s
end)
COMMUNITY QUESTION
How do I make this screen shake have multiplayer support?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Everytime, I play in-game on the ROBLOX client, it doesn't work at all. In studio, it works perfectly fine, what can be the fix for this problem?
Hm. Try going into the game.Workspace.Camera I think that is global camera.
https://forum.scriptinghelpers.org/topic/192/how-to-use-localplayer/6