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: Players.

Previous Thread :: Next Thread 
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
08 Sep 2011 07:21 PM
I've seen 2 methods of accessing 'Players'(The datamodel).

What's the difference?

Version A

game.Players

Version B

game:GetService("Players")

Report Abuse
swmaniac is not online. swmaniac
Joined: 28 Jun 2008
Total Posts: 15773
08 Sep 2011 07:23 PM
Version A is faster.
Version B gets the players service regardless of its name.
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
08 Sep 2011 07:25 PM
Use game.Players in regular scripts that you'd use in your game, because I doubt you'd change the name of Players. game:GetService("Players") will get you to Players, even if Players isn't named Players. Use this in script you use in script builders because some fr00b will probably change the name of Players.

~{::Epic Hologram Maker::}~
~http://www.roblox.com/Hologramizer-item?id=60142277
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
08 Sep 2011 07:26 PM
Meh, okay. I've seen them do GetService, and it made no sense to do that in my opinion. :P
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