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 » Scripters
Home Search
 

Re: Quick question

Previous Thread :: Next Thread 
Dollar500 is not online. Dollar500
Joined: 12 Jan 2013
Total Posts: 504
01 Jul 2015 02:50 PM
How do you get all players on a server into a table?
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
01 Jul 2015 02:52 PM
game.Players:GetPlayers() -- returns a table of all the players in game
Report Abuse
Dollar500 is not online. Dollar500
Joined: 12 Jan 2013
Total Posts: 504
01 Jul 2015 03:16 PM
Don't you have to do something like this along with above?

table = {}
table[1] = "stuff"
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
01 Jul 2015 03:16 PM
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting


"Talk is cheap. Show me the code." - Linus Tivalds
Report Abuse
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
01 Jul 2015 03:17 PM
If you're trying to do something with the players(I suppose you are) Use this:


for i,v in pairs(game.Players:GetPlayers())do
print(v.Name)
end
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
01 Jul 2015 03:18 PM
no

:GetPlayers() returns the table for you

you can then manipulate it at will

for i, player in pairs(game.Players:GetPlayers()) do
print(player.Name)
end
Report Abuse
instawin is not online. instawin
Joined: 04 Jun 2013
Total Posts: 8777
01 Jul 2015 03:18 PM
magical ninja'd me lel

floodcheck qq
Report Abuse
magicalandre13 is not online. magicalandre13
Joined: 21 Jan 2011
Total Posts: 5327
01 Jul 2015 03:24 PM
lolol
Report Abuse
Dollar500 is not online. Dollar500
Joined: 12 Jan 2013
Total Posts: 504
01 Jul 2015 04:07 PM
Why doesn't this work?

for i, player in pairs(game.Players:GetPlayers()) do
print(table.concat(player.Name, " "))
end
Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
01 Jul 2015 04:24 PM
wiki.roblox.com/index.php?title=Table

u sicko!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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