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 » Scripters
Home Search
 

Re: Put values into a table

Previous Thread :: Next Thread 
fwep67 is not online. fwep67
Joined: 21 Nov 2009
Total Posts: 352
15 Feb 2016 11:20 AM
If I had multiple values in a folder how would I make a script that would put all of those values into a table.

~If you read/helped me on my previous question, this is not the same question~



Report Abuse
hovertank7 is not online. hovertank7
Joined: 15 Nov 2008
Total Posts: 178
15 Feb 2016 11:31 AM
Take a look at these wiki pages:

http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions&redirect=no#pairs

http://wiki.roblox.com/index.php?title=Function_dump/Table_manipulation#table.insert

It would look something like this:

local tab = {}

for i, v in pairs(folder:GetChildren() do

table.Insert(tab, i, v.Value)

end
Report Abuse
fwep67 is not online. fwep67
Joined: 21 Nov 2009
Total Posts: 352
15 Feb 2016 11:35 AM
Thanks man! :D



Report Abuse
hovertank7 is not online. hovertank7
Joined: 15 Nov 2008
Total Posts: 178
15 Feb 2016 11:37 AM
I missed a bracket on this line:

for i, v in pairs(folder:GetChildren()) do

that's the corrected version
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
15 Feb 2016 12:19 PM
doesn't have to be a pairs loop but ya
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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