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: Table Of Players

Previous Thread :: Next Thread 
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
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 is not online. 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
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
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
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
16 Jan 2014 11:11 PM
would it be something like this?
(without the conditional statement)

local table = {game.Players:GetPlayers()}

?
Report Abuse
alexthemongolian is not online. alexthemongolian
Joined: 23 Mar 2011
Total Posts: 655
16 Jan 2014 11:14 PM
yes. that would return a table of players in the server
Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
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
alexthemongolian is not online. alexthemongolian
Joined: 23 Mar 2011
Total Posts: 655
16 Jan 2014 11:20 PM
You can't just do
Player = new
Report Abuse
Thaeh is not online. Thaeh
Joined: 05 Feb 2011
Total Posts: 7685
16 Jan 2014 11:21 PM
table.insert(instance, table)
Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
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
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
16 Jan 2014 11:24 PM
ill include the new table instance...
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