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

How to make a script to change your camera angle using < and > buttons?

Asked by 3 years ago

I have been searching on Google how to change your camera angle using the < and > buttons and so far couldn't find anything to help me. Could anyone maybe help me with that or give me links to useful sites that I can use to help find what I am looking for? Yes, I don't have a script for it, I am just trying to get help in the right direction of how to do so.

1 answer

Log in to vote
0
Answered by 3 years ago

You could start by using UserInputService and the InputBegan event to run your code when an arrow key is pressed.

https://developer.roblox.com/en-us/api-reference/event/UserInputService/InputBegan

Then you could multiply the Camera's CFrame by an angle.

local Camera = workspace.CurrentCamera
Camera.CFrame = Camera.CFrame * CFrame.Angles(0, math.rad(DEGREES), 0)
Ad

Answer this question