Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Check if a player is in first person?

Asked by 9 years ago

How can I check if a player is in first person?

[I do not need a first person lock. I need to check if the player is in first person.]

1 answer

Log in to vote
1
Answered by
ImageLabel 1541 Moderation Voter
9 years ago

I assume you already know how to set a player's CameraMode to first person.

player = game:GetService('Players').LocalPlayer

player.CameraMode = Enum.CameraMode.LockFirstPerson

All you would have to do to check would be to check if the CameraMode is set to Enum.CameraMode.LockFirstPerson, and proceed accordingly.

player = game:GetService('Players').LocalPlayer

if player.CameraMode == Enum.CameraMode.LockFirstPerson then
    print('locked')
else
    print('unlocked')
end
Ad

Answer this question