How would I be able to stop the First-Person camera to rotate on the y axis?

How would I be able to not let the player’s camera turn on the y axis?

like show here :

External Media

I used the arrow keys to get the camera I would want

thanks!

i don’t believe theres any way to go about this without manually overriding the camera and programming it yourself. if you do wish to go about this, there are many ways to go about it depending on what type of camera you want.

if its a first person camera, just get the Y rotation of the character’s head using CFrame:ToOrientation() and constantly set the camera’s CFrame to a CFrame of the head’s position without rotation and multiply by the Y radian you got through the CFrame:ToOrientation() method. to create your rotation effect, when you move the mouse left/right just rotate the character side to side like that.

if its a stationary camera akin to a game like fnaf or something, you’d do the same thing, create a Y rotation offset and when you move left/right add or subtract from it and multiply a CFrame reference point by that Y value.

I have found a solution, I just copied the player module from my character in players when the game was running, stopped the game, pasted it in starter player, starter player scripts, then I went into player module, camera module, base camera and changed these to 0
image

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.