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

Need Help with Lock First Person script help?

Asked by 5 years ago

I made a lock first person script but itwont work why?

game.Players.LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

ServerScriptService.FP Script:1: attempt to index field 'LocalPlayer' (a nil value)

0
Change it to LocalScript and put it in StarterGui, and this error happens because you are Using a Server Script, that can't get LocalPlayer. yHasteeD 1819 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
Edited 5 years ago

Make a local script and place it in the StarterGui. Then write this script.

player = game.Players.LocalPlayer
player.CameraMode = "LockFirstPerson"

That should lock your player into first person.

Ad

Answer this question