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

How do I use LockFirstPerson?

This is a LockFirstPerson Script and it isn't working. I tried killing myself. There's errors. Here is the code

local play = game.Workspace.LocalPlayer 

player.CameraMode = Enum.CameraMode.Classic
wait()
player.CamearMode = Enum.CameraMode.LockFirstPerson

1 comment

0

Also, there is already a post like this, and it's even on the front page. Next time try to skim over a few pages of questions to see if your question has been asked!

2 answers

I have found two problems with this code.

First, the player object is not a part of Workspace. It is a part of Players. To fix this you just change game.Workspace into game.Players

And second, you define the player as play but then try to access it as player. Just change one or the other and this should work fine.

You need game.Players.LocalPlayer for changing camera modes like that.

2 comments

0

Where do i change that?

0

Never mind, I see problem.

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