How do I make a simple if function tell if local player is currently in first person?

I’m still new to scripting just familiar with it and so I just need that small piece of code that tell you if camera is currently in first person, That’s it. What’s that piece of code that tells you the camera is all the way zoomed in or that it’s in first person? I’m not sure if I’m explaining it clearly but here’s a simple example:

local Camera = workspace.CurrentCamera
local CameraZoom =
I DON’T KNOW WHAT TO PUT HERE. This is the thing I need help with. I don’t know any child of camera that tells the current camera zoom or that tells if first person is true. Is it even in camera?

if CameraZoom == 0.5 then
print(“First person”)
else
print(“Not in first person”)
end

1 Like

I am pretty sure you can use a local script for this, here is an article on the first-person lock to put them in first-person instead of changing the camera zoom:

(Sorry rushes this post)

For your if statement you could put

local player = game.Players.LocalPlayer
 if player.CameraMode == Enum.CameraMode.LockFirstPerson then
— code
end
2 Likes

Yeah I wasn’t clear enough. I’m not trying to make a script that locks in first person, that’s not my intention. I’m trying to make a script that tell you if the player is zoomed in to first person or not.
Edit: oh I thought the cameramode.LockFirstPerson only works to lock in first person. Thanks

Well, Maybe you should use .Magnitude so, checking if the camera between Head Position and Camera position has changed. So if the magnitude is <= 1 then you now know the player has zoomed inside, like first person

1 Like

that works until the player jumps or moves a little bit too fast