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: Tables

Previous Thread :: Next Thread 
ScriptGuilder is not online. ScriptGuilder
Joined: 07 Aug 2014
Total Posts: 848
05 Oct 2014 09:46 AM
maps = {}
for i,v in pairs(game.Lighting:GetChildren())
do
if v:IsA("Model") then
table.insert
end
end

Im trying to find everything in lighting and if its a model insert it into the table, and I don't know what to do atm.


Nursing a baby pinecone back to health
Report Abuse
Buddy6445 is not online. Buddy6445
Joined: 01 Nov 2008
Total Posts: 137
05 Oct 2014 10:12 AM
table.insert(maps, v)

http://wiki.roblox.com/index.php?title=Table_manipulation#table.insert
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
05 Oct 2014 10:13 AM
You can't just do table.insert and end it there... Look at the arguments for table.insert. You'll see that they're the table to insert into and the index point of it. Personally, I would do maps[#maps+1] = v.
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
05 Oct 2014 10:14 AM
Just take all your maps and group them then put that model in lighting and do this:

maps = game.Lighting.Model:GetChildren()
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
05 Oct 2014 10:14 AM
Ninja'd. Ouch. And I was wrong on the second argument. You can understand why I don't use table.insert a lot.
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