|
| 25 Aug 2011 08:07 PM |
table.insert(parts,wp[i],wp[i].Name)
that's not all just one part. If you want the whole script then just ask. |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 08:09 PM |
Output:
Thu Aug 25 21:04:29 2011 - Workspace.Script:11: bad argument #2 to 'insert' (number expected, got userdata) |
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 08:14 PM |
Here's the whole script:
local parts = {} local models = {} local modelc local partc local check = 0.25 local waitTime = 0.5 while wait(check) do wp = game.Workspace:GetChildren() for i = 1,#wp do if wp[i].ClassName == "Part" then table.insert(parts,wp[i],wp[i].Name) partc = partc + 1 wait(waitTime) end end print(unpack(parts)) wm = game.Workspace:GetChildren() for i = 1,#wm do if wm[i].ClassName == "Model" then table.insert(models,wm[i],wm[i].Name) modelc = modelc + 1 wait(waitTime) end end print(unpack(parts)) print(modelc) print(partc) wait(waitTime) end
|
|
|
| Report Abuse |
|
|
|
| 25 Aug 2011 09:27 PM |
Are you trying to insert a value into a table with the keys an object value?
rawset(parts,wp[i],wp[i].Name) |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2011 08:18 PM |
| No, trying to make as many table spaces as there are in part wise, and the name of them is the name of the parts. Same with the models. |
|
|
| Report Abuse |
|
|
|
| 26 Aug 2011 09:07 PM |
| instead of table.insert, do what I posted 2above |
|
|
| Report Abuse |
|
|