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
 

Re: Add a player to a table if they have a certain value?

Previous Thread :: Next Thread 
Wazupmaster is not online. Wazupmaster
Top 100 Poster
Joined: 09 Aug 2008
Total Posts: 37063
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 is not online. 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
Wazupmaster is not online. Wazupmaster
Top 100 Poster
Joined: 09 Aug 2008
Total Posts: 37063
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
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