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

FirstPerson Lock issue [closed]

Asked by
wddd89 35
11 years ago

This question already has an answer here:

How to put on LockFirstPerson

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.

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

Any help is appreciated. thanks.

0
Try also waiting for the player's character User#2 0 — 11y

Marked as Duplicate by Unclear

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
1
Answered by
Axstin 55
11 years ago

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

1wait() -- Better to be safe than sorry
2 
3local p = game:GetService("Players").LocalPlayer
4p.CameraMode = Enum.CameraMode.LockFirstPerson
0
Thanks. Will try it wddd89 35 — 11y
Ad