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

Need Help with Lock First Person script help?

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)

1 comment

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.

1 answer

✓ Accepted answer

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.

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