How do I make this screen shake have multiplayer support?
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)