How do I tell when a player goes in first person?

As said in the title I would like to know how to make it so I can tell when the player goes in first person.
This probably isnt hard but I want to know!

I coulndt find a post on this for some reason lol

2 Likes

Player.CameraMode

It will be set to Enum.CameraMode.LockFirstPerson while the player is in first person.

This isnt working. I have tested it and I can see if the player does go into first person the script doesnt run.

It should print something.

Im just using PropertyChangedSignal, and yes I am looking at the value, Its not changing.

This does work if the player scrolls into first person right?

My bad. That’s what it is when you force first person.

Take a look at this:

This is just false. When you zoom all the way in, it is not set to Enum.CameraMode.LockFirstPerson.

You can do it by checking the distance between the camera and the player’s head every frame and see if it’s low enough where it would be considered to be zoomed in.

Example: How to Check if a Player is Fully Zoomed in?

2 Likes

A simple way of doing this is to check the distance between the camera and the limb of the character where the camera is based on, i.e head

--localscript
local Player = game:GetService("Players").LocalPlayer
local FIRST_PERSON_DISTANCE = 1

local function IsInFirstPerson(CameraPoint: Vector3): boolean 
   return Player:DistanceFromCharacter(CameraPoint) < FIRST_PERSON_DISTANCE; 
end

3 Likes