I don't know if this can be done but I tried researching whether it is possible to use the function :GetChildren()
to change and set the same property for all parts under a model. How can this be done, if possible?
myModel = script.Parent.Model myModelParts = myModel:GetChildren() myModelParts.Anchored = true myModelParts.Transparency = 0.5 myModelParts.Position = myModelParts.Position+Vector3.new(1,0,1)
Yep. Just loop through the children.
local myModel = script.Parent:FindFirstChild("Model") local myModelChildren = myModel:GetChildren() for _, child in pairs(myModelChildren) do if child:IsA("BasePart") then child.Anchored = true child.Transparency = 0.5 child.Position = child.Position + Vector3.new(1, 0, 1) end end
Hope this helps! :)