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

Camera shake on touch for some time ?

Asked by 5 years ago
Edited 5 years ago

How can I make script that shakes the player's screen after he touches a specific part for some time like 5 secconds ?

1 answer

Log in to vote
0
Answered by
Benbebop 1049 Moderation Voter
5 years ago

This should work

local speed = 1 --speed of shaking

for i = 1, (30*speed) do
    local x = math.random(-100,100)/100
    local y = math.random(-100,100)/100
    local z = math.random(-100,100)/100
    game.Players.LocalPlayer.Character.Humanoid.CameraOffset = Vector3.new(x,y,z)
    wait(1*10^(speed*(-1))
end

something like that, the math is probably wrong.

0
I meant after he touches a specific block.. But thanks anyway kikocraftak233 18 — 5y
Ad

Answer this question