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
 

Table of Players.

Previous Thread :: Next Thread 
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
19 Feb 2014 03:33 AM
This doesn't work: (it says Players[1] is nil when i test)

Players = {}

game.Players.PlayerAdded:connect(function(p)
table.insert(Players, p)
end)

game.Players.PlayerRemoving:connect(function(p)
for i=1, #Players do if p==Players[i] then table.remove(Players, i) end end
end)
Report Abuse
flatline115 is not online. flatline115
Joined: 29 Jul 2013
Total Posts: 7826
19 Feb 2014 04:00 AM
why not just do Players = game.Players:GetPlayers()
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
19 Feb 2014 04:10 AM
i use a for loop to move all the players into random teams later in the script
Report Abuse
Ultraw is not online. Ultraw
Joined: 20 Nov 2010
Total Posts: 6575
19 Feb 2014 04:13 AM
Wait

You were right.
Thanks
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