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

How do you make your screen spin like holding an arrow key?

Asked by 4 years ago

Similar to holding the left or right arrow key, how would I make that work?

I'm not very good with cameras sorry!

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

i believe you'd have to multiply the CFrame of the camera by the angle you'd like it to rotate.

so maybe something this:

local camera = workspace.CurrentCamera;
camera.CameraType  =Enum.CameraType.Scriptable

local angle = CFrame.Angles(0, 0,math.rad(5)) -- a 5degrees rotation on the Z axis
while wait() do
    camera.CFrame = camera.CFrame * angle
end
0
Thank you so much! I was getting a bit angry trying to figure out how to do it GIassWindows 141 — 4y
0
np User#23252 26 — 4y
0
Hey, I used your script and when I die the camera kinda went crazy GIassWindows 141 — 4y
0
Nvm, I fixed it GIassWindows 141 — 4y
0
ok lol User#23252 26 — 4y
Ad

Answer this question