nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 08 Aug 2011 01:13 PM |
I kind of dislike the fact that you can't unanchor a model alone
I have a model with several other models in it, and in them even more models...
Model >Model >>Model >>>Parts >Model >>Model >>>Parts >>Model >>>Parts >Model >>Model >>>Parts >Model >>Model >>>Parts >>Model >>>Parts >Model >>Model >>>Parts >>Model >>>Parts >Model >>Model >>>Parts >Model >>Model >>>Parts
Something like that, how can I get everything ALLL together in that model, and inside get all the parts inpairs?
|
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 08 Aug 2011 01:15 PM |
function unAnchor(Model) for i, v in pairs(Model:GetChildren()) do if v:IsA("BasePart") then v.Anchored = false elseif v:IsA("Model") then unAnchor(v) end end
unAnchor(TheMainModel) |
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 08 Aug 2011 01:16 PM |
Missed an end D:
function unAnchor(Model) for i, v in pairs(Model:GetChildren()) do if v:IsA("BasePart") then v.Anchored = false elseif v:IsA("Model") then unAnchor(v) end end end
unAnchor(TheMainModel) |
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 08 Aug 2011 01:18 PM |
Spec, I added the extra end, then the next output
>Mon Aug 08 14:17:26 2011 - Workspace.Script:2: stack overflow
|
|
|
| Report Abuse |
|
|
Spectrumw
|
  |
| Joined: 04 Aug 2009 |
| Total Posts: 13510 |
|
|
| 08 Aug 2011 01:21 PM |
function unAnchor(Model) for i, v in pairs(Model:GetChildren()) do if v:IsA("BasePart") then wait() v.Anchored = false elseif v:IsA("Model") then unAnchor(v) end end end
unAnchor(TheMainModel)
Try that. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 08 Aug 2011 01:30 PM |
Same output :/
Mon Aug 08 14:30:22 2011 - Workspace.Script:2: stack overflow
|
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 08 Aug 2011 01:35 PM |
| No idea why it is erroring that output |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
| |
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 08 Aug 2011 01:56 PM |
May anyone help me out, please?
~This is a siggy |
|
|
| Report Abuse |
|
|
comiconor
|
  |
| Joined: 26 May 2009 |
| Total Posts: 16893 |
|
| |
|