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: Is this how game makers make a table of players?

Previous Thread :: Next Thread 
xLink123 is not online. xLink123
Joined: 07 Aug 2014
Total Posts: 11158
18 Feb 2015 08:15 PM
players = {}

game.Players.PlayerAdded:connect(function(player)
table.insert(players, #players + 1, player.Name)
print(table.concat(players, ""))
end)


Is there a more efficient way to create items in a table? Is there a way to print out all the items of a table? I'm sure there is I'm just new to tables and am playing around with the table manipulation wiki article.
Report Abuse
xLink123 is not online. xLink123
Joined: 07 Aug 2014
Total Posts: 11158
18 Feb 2015 08:17 PM
Bump [0]
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
18 Feb 2015 08:18 PM
local players = game.Players:GetPlayers()

done
Report Abuse
FrostyFires is not online. FrostyFires
Joined: 11 Jul 2013
Total Posts: 272
18 Feb 2015 08:18 PM
game.Players:GetPlayers()
Report Abuse
xLink123 is not online. xLink123
Joined: 07 Aug 2014
Total Posts: 11158
18 Feb 2015 08:21 PM
So that creates a table? I can remove players based on if their character dies using table.remove?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
18 Feb 2015 08:22 PM
yeah and yeah. what else would it give you :)?
Report Abuse
xLink123 is not online. xLink123
Joined: 07 Aug 2014
Total Posts: 11158
18 Feb 2015 08:22 PM
Ebola
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
18 Feb 2015 08:23 PM
dude...

just call that when you need a table of all the players
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