|
| 16 Jan 2014 10:54 PM |
Alright, to start i am a little bit of a noob on tables in scripting so, how would you set up a table of all players that are under a certain condition?
(if you dont understand the "under a certain condition" part then just give me a setup on a table of players and ill try to figure it out.) |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 16 Jan 2014 11:08 PM |
http://wiki.roblox.com/index.php/GetChildren_(Function) http://wiki.roblox.com/index.php/Table http://wiki.roblox.com/index.php/Conditional_statement |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:09 PM |
thanks for the links even though i know conditional statements thanks for the effort ill try to learn from this... |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:11 PM |
would it be something like this? (without the conditional statement)
local table = {game.Players:GetPlayers()}
? |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:14 PM |
| yes. that would return a table of players in the server |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:18 PM |
local variableI = game.Players:GetPlayers() for number,player in pairs (variableI) do if player.Playergui.SurvivalGui.TurnOff.Visible == true then player = new end end
local table = {new}
would this work? this doesnt seem right |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:20 PM |
You can't just do Player = new |
|
|
| Report Abuse |
|
|
Thaeh
|
  |
| Joined: 05 Feb 2011 |
| Total Posts: 7685 |
|
|
| 16 Jan 2014 11:21 PM |
| table.insert(instance, table) |
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:24 PM |
how about this?
local variableI = game.Players:GetPlayers() local table = {variableI} for number,player in pairs (table) do if player.Playergui.SurvivalGui.TurnOff.Visible == false then table.remove(table, player) end end
|
|
|
| Report Abuse |
|
|
|
| 16 Jan 2014 11:24 PM |
| ill include the new table instance... |
|
|
| Report Abuse |
|
|