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

First Person Mode? [UNANSWERD]

I have been trying to add First person mode to my game. But it just cannot work. I tried putting the local script in StarterGUI but doesn't work Here's the code:

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

3 comments

0

@OP; if Europe's answer doesn't help you, you'll need to let us know why. His answer of setting the MaxZoomDistance to .5 works.

0

adark isn't 0.5(.5) the Max of a Players?

0

.5 is First Person. It is the minimum value for Max and MinZoomDistance.

2 answers

There is a Settings in StarterPlayer where you can control the Zoom in and Zoom out, or you can just switch it to FPS mode in the CameraMode. If you want to Limit a Players Zoom-Out you can change the settings in the StarterPlayer or use this Example Script:

game.StarterPlayer.CameraMaxZoomDistance=0.5--Original was 400
game.StarterPlayer.CameraMinZoomDistance=0.5--Make this a Script!

-- or this way

game.StarterPlayer.CameraMode="LockFirstPerson"

NOTE: You do not have to use this script, Just change the Settings in StarterPlayer LAYOUT: http://prntscr.com/6m7uxc

if this Helped please Upvote and Accept answer !

1 comment

1

Actually his way is actually correct, 789zaya's way actually works. Do not thumbs down something if it does work. Test it out yourself!

You don't need to script it. Just open Explorer>StarterPlayer (Click Starterplayer ONCE)>Properties>CameraMode change from Classic To FirstPersonLock. You don't even need to script it anymore

3 comments

0

Did this help?

0

I just said that.

0

Duplicated answer.

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