Hi, I am currently making a script for a first person game but I’m having problems with preventing the player from looking backwards. I’ve tried checking the cframe of their camera but I can’t get it to work correctly. I was wondering if there is a certain camera property I could check which would allow me to make sure they can’t look backwards? Thanks.
Normally, in first person, your character turns toward the camera’s direction except on the Y axis.
I’m talking about preventing the camera from going backwards, not the character.
As in, zoom out? Can you give an video example of what you are trying to prevent?
What I’m trying to do is have a camera in first person, and make it for it can’t turn its head backwards (so I can’t enter my head into the other 180 angle of my 360 degree view by dragging my camera over)
Ya that’s prevented from the fact that your character turns around as well.
So should I restrict my character that he can only turn his head in the front 180 degrees while putting something behind it like a part for it can’t look backwards?
I’m not sure about that, but do you have a script that doesn’t turn the character around in fp? This is only useful if that is the case.
Well I just set the character’s speed and jump to 0 and also anchored it’s body so yes.
There are a few camera types you can mess around with, the one it seems you are looking for is Scriptable
If you want some more info on camera types then you can take a look at this article:
https://developer.roblox.com/en-us/api-reference/property/Camera/CameraType