Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the script not unachoring the model i made in the workspace?

Asked by 8 years ago
1game.Workspace.Model1.Anchored = false

It's telling me Anchored is not a member of Model1??? what does this mean? :/

1 answer

Log in to vote
2
Answered by 8 years ago

an Instance of type Model does not have a property called Anchored. Anchored is a property of Parts not models. If you want to unanchor a model you will have to unanchor every single part that is inside recursive loop would do it something like

01function Unanchor(parent)
02    for _, p in ipairs(parent)do
03        if p:IsA("BasePart")then
04            p.Anchored = false
05        end
06        Unanchor(p)
07    end
08end
09 
10Unanchor(game.Workspace.Model1)
Ad

Answer this question