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