Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

FirstPerson Lock issue

Oh boy.. I know that this has been asked for quite a few times throughout the website, but I can't seem to get it to work. I've put it in StarterGui and set it to a localscript.

repeat wait() until game.Players.LocalPlayer
local p = game.Players.LocalPlayer
p.CameraMode = "LockFirstPerson"

Any help is appreciated. thanks.

1 comment

0

Try also waiting for the player's character

1 answer

✓ Accepted answer

No need to wait for the LocalPlayer. Try something like this:

wait() -- Better to be safe than sorry

local p = game:GetService("Players").LocalPlayer
p.CameraMode = Enum.CameraMode.LockFirstPerson

1 comment

0

Thanks. Will try it

This discussion is preserved as it was. New answers, comments, and votes are closed.