How can I check when the LocalPlayer is in first person?

I am trying to do something that detects when a player is in first person. I don’t want it to be locked first person. I checked for possible camera and player properties, but nothing helped.

Note: DO NOT USE THE API, read the content and the solution is there, which code is:

local camera = workspace.CurrentCamera
local distance = (camera.CFrame.p - camera.Focus.p).magnitude  -- wait, this is old magnitude :/
local isFirstPerson = distance <= 0.5
2 Likes