generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Problem with LockFirstPerson

Previous Thread :: Next Thread 
1Juice1 is not online. 1Juice1
Joined: 03 Jul 2014
Total Posts: 108
17 Jul 2014 12:13 AM
I'm new to ROBLOX, and I can't figure out why this doesn't work. Nothing in the output, it just doesn't happen. I have this code placed inside a localscript inside the player's StarterGui:

game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

What am I doing wrong? Is there something i'm forgetting?
Report Abuse
Fidgeting is not online. Fidgeting
Joined: 08 Feb 2014
Total Posts: 1193
17 Jul 2014 12:16 AM
starterpack
Report Abuse
thejonathann is not online. thejonathann
Joined: 14 Dec 2010
Total Posts: 76
17 Jul 2014 12:17 AM
wait(2)
game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson

try that
Report Abuse
Fidgeting is not online. Fidgeting
Joined: 08 Feb 2014
Total Posts: 1193
17 Jul 2014 12:18 AM
'wait(2)'


LOLOLOL

you only added a wait time. no differences
Report Abuse
1Juice1 is not online. 1Juice1
Joined: 03 Jul 2014
Total Posts: 108
17 Jul 2014 12:18 AM
Thanks! Testing it now.
Report Abuse
BLOXLUA is not online. BLOXLUA
Joined: 16 Mar 2013
Total Posts: 453
17 Jul 2014 12:19 AM
game.Players.LocalPlayer.CameraMode="Classic"
game.Players.LocalPlayer.CameraMode="LockFirstPerson"

--Works for me like this.
Report Abuse
1Juice1 is not online. 1Juice1
Joined: 03 Jul 2014
Total Posts: 108
17 Jul 2014 12:24 AM
Problem solved! Using this code inside Localscript in StarterPack fixed it:

wait(2)
game.Players.LocalPlayer.CameraMode="Classic"
game.Players.LocalPlayer.CameraMode="LockFirstPerson"
Report Abuse
Fidgeting is not online. Fidgeting
Joined: 08 Feb 2014
Total Posts: 1193
17 Jul 2014 12:25 AM
you could've just used your original code and have placed the localscript in starterpack lol
Report Abuse
1Juice1 is not online. 1Juice1
Joined: 03 Jul 2014
Total Posts: 108
17 Jul 2014 12:27 AM
Probably, but it turns out I need to let it wait a second or two to let the camera load on slower computers (Really bad pc) or something like that. Dunno, but thanks for the help!
Report Abuse
Fidgeting is not online. Fidgeting
Joined: 08 Feb 2014
Total Posts: 1193
17 Jul 2014 12:28 AM
well, i don't have those problems, so i never use wait() times just for a script to start doing its business.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image