So I’m using a GetChildren() to get the children of a model to unanchor it but if i run the command it says model2 does not have an anchor property. It works but it errors on Model2 which is a model inside the model I’m trying to use get children. How can I make it so it just gets everything even the models inside the model? Here is my script:
local Parts = game.Workspace.Overloader1.Metal:GetChildren()
for _,v in pairs(Parts) do
coroutine.wrap(function()
v.Anchored = false
end)()
end
:GetChildren() will return all of the immediate children present in that container, whereas :GetDescendants() will return all of the children of all the children of the container and so forth, so it is up to you.
So if I had a part in another part, :GetDescendants() would loop through both those parts, but :GetChildren() would only run on the parent part (in the model).