superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 21 Sep 2012 09:45 PM |
So I made a table via script:
open = {}
for i,v in pairs(model:children()) do open[i] = {v.Name,"open"} end
for i,v in pairs(open) do if open[i][2] == "open" then --blah end end
I get an error though.
22:35:29 - 2 is not a valid member of Part
This doesn't happen to me in another script that works fine; why is this happening? |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 21 Sep 2012 09:51 PM |
for i,v in pairs(model:children()) do table.insert(open,v.Name"} end
for i,v in pairs(open) do i == 2 then print(i) end end
|
|
|
| Report Abuse |
|
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 21 Sep 2012 09:53 PM |
I'm not trying to insert the name into the table "open". I'm trying to create a dictionary with parts in a model.
open = { [1] = v.Name, "open", } |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2012 09:55 PM |
| Do you have actual code within --blah ? |
|
|
| Report Abuse |
|
|
superior
|
  |
| Joined: 13 Apr 2008 |
| Total Posts: 1662 |
|
|
| 21 Sep 2012 09:58 PM |
| Yes, but I fixed it. I accidentally had a "table.insert(open, part)" in my generation chunk... Sorry to waste time. >.> |
|
|
| Report Abuse |
|
|