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
10 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.

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

Any help is appreciated. thanks.

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

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
10 years ago

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
0
Thanks. Will try it wddd89 35 — 10y
Ad