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

First Person Mode? [UNANSWERD] [closed]

Asked by 9 years ago

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"
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. adark 5487 — 9y
0
adark isn't 0.5(.5) the Max of a Players? woodengop 1134 — 9y
0
.5 is First Person. It is the *minimum* value for Max and MinZoomDistance. adark 5487 — 9y

Locked by BSIncorporated, adark, and EzraNehemiah_TF2

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
4
Answered by
woodengop 1134 Moderation Voter
9 years ago

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
Actually his way is actually correct, 789zaya's way actually works. Do not thumbs down something if it does work. Test it out yourself! EzraNehemiah_TF2 3552 — 9y
Ad
Log in to vote
-1
Answered by 9 years ago

You don't need to script it. Just open Explorer>StarterPlayer (Click StarterplayerONCE)>Properties>CameraModechange from ClassicTo FirstPersonLock. You don't even need to script it anymore

0
Did this help? 789zaya 0 — 9y
0
I just said that. woodengop 1134 — 9y
0
Duplicated answer. woodengop 1134 — 9y