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

How do you make a FirstPerson Script?

Do you need to use a local script and change the field of view?

2 answers

You can do this to lock the player`s camera on first person when they enter the game:

game.Players.PlayerAdded:connect(function(plr) --Gets the player as they enter the game
	plr.CameraMode = Enum.CameraMode.LockFirstPerson --Changes the player`s cameramode property to lockfirstperson
end)

The above srcipt MUST be in a local script to work.

2 comments

1

No, it can be in a normal script.

0

To work in online mode, it has to be in a local script

Put this in a LocalScript in StarterPack

while true do
	game.Players.LocalPlayer.CameraMaxZoomDistance = 0
	wait(15) -- So the game doesn't crash.
end

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