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: String, or not a sting? (FPS Lock, CameraMode = " ")

Previous Thread :: Next Thread 
Cataclyzmic is not online. Cataclyzmic
Joined: 29 Jan 2011
Total Posts: 1479
20 Feb 2014 06:58 PM
I'm adding a FirstPerson Lock to my game, and i have a question.

Once adding it on there, the way i know to enable a FPS Lock, is by this.

game.Workspace.Players.LocalPlayer.CameraMode = blahblahblah.

Now, the blahblahblah part. Is what i need an answer for.


Originally, it's set to Classic, the only other alternative is LockFirstPerson.



Is LockFirstPerson a string, when entering it into the code.
where it would be

game.Workspace.Players.LocalPlayer.CameraMode = "LockFirstPerson"
or link...?
Report Abuse
V0xels is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
20 Feb 2014 07:00 PM
WRONG WRONG WRONG!!!!

PLAYERS IS NOT LOCATED IN WORKSPACE!!!

game.Players.LocalPlayer.CameraMode = "LockFirstPerson"

Should work, but recently I heard there's a bug with the camera unless they fixed it in the recent update.
Report Abuse
Fearlessblocky202 is not online. Fearlessblocky202
Joined: 16 Jun 2010
Total Posts: 391
20 Feb 2014 07:03 PM
THe glitch is 100% fixed..
Report Abuse
V0xels is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
20 Feb 2014 07:04 PM
Oh, ok then yea what I said earlier should work than.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
20 Feb 2014 07:06 PM
It's not a string, but you can use a string to set the value.
The actual value is an Enum of type Enum.CameraMode.

So, "LockedFirstPerson" and Enum.CameraMode.LockedFirstPerson are both valid entries, but the latter is more formal.
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
20 Feb 2014 07:07 PM
In my previous post, change all instanced of "LockedFirstPerson" to "LockFirstPerson".

^_^
Report Abuse
V0xels is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
20 Feb 2014 07:07 PM
Basically what FireFox said is 100% correct, Use whichever method you would like to.
Report Abuse
Cataclyzmic is not online. Cataclyzmic
Joined: 29 Jan 2011
Total Posts: 1479
20 Feb 2014 07:35 PM
Wow, well. I've never approached Players before really.

LocalPlayers and all. I just do GUI's mainly.


Thanks guys!
Report Abuse
V0xels is not online. V0xels
Joined: 30 Mar 2012
Total Posts: 2072
20 Feb 2014 07:48 PM
It's alright, nobody is perfect at everything for script, even advanced scripters make mistakes (Not saying im advanced at all)
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