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

Unanchor everything in a group?

Asked by 5 years ago
Edited 5 years ago

Is there a way to unanchor everything in a group?

I think you use GetChildren

I've got no idea.

0
You can use GetChildren if you want programmerHere 371 — 5y

1 answer

Log in to vote
0
Answered by
pwx 1581 Moderation Voter
5 years ago

Yes, you've got the right idea. You would use :GetChildren(), this is a way to cycle through a table of things.

for _,v in pairs(workspace:GetChildren()) do -- change this to your group
    if v:IsA('BasePart') then -- check if it's a basepart (meshpart, part, etc)
        v.Anchored = false -- and, unanchor
    end
end

You can read up more on GetChildren() here.

0
Thank you so much. isaacjh100 41 — 5y
Ad

Answer this question