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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 01 Jul 2015 03:18 PM |
magical ninja'd me lel
floodcheck qq |
|
|
| Report Abuse |
|
|
| |
|
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
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 01 Jul 2015 04:24 PM |
wiki.roblox.com/index.php?title=Table
u sicko! |
|
|
| Report Abuse |
|
|