|
| 26 Aug 2014 08:25 PM |
Hey. So, I'm making a script that takes all the players in the game and separates them into 3 different groups. So far, I have that done. The script will take a few people, change a NumberValue inside the player to 2, and then choose a few others, change the value to 3, and then choose the rest, making the value into 1...
But I'm gonna need the script to periodically check to see if there are any "1" people left. I thought the easiest way to do this would be to put all the "1" people into a table... but I don't know how to write a script that checks the values of all players and puts them into their own tables/arrays.
I know I could do this probably more efficiently by having them put into the tables when they're value is chosen, but that's not really the issue.. the issue is that I don't know how to put them into a table.
Can anyone offer any help? And if my wording wasn't clear enough, please ask me to clarify. |
|
|
| Report Abuse |
|
DukeCow
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 13176 |
|
|
| 26 Aug 2014 08:55 PM |
x = player.value = 1 table.insert(tablename)x --idk something like that |
|
|
| Report Abuse |
|
|
| 26 Aug 2014 09:10 PM |
| Ohh, I didn't know there was a table.insert function... that helps a lot. Thank you! |
|
|
| Report Abuse |
|