Hey so i’m trying to modify all part childrens of this model but this simple test script does not work…
1 | parts = workspace.Model:GetChildren() |
2 |
3 |
4 |
5 | parts.Anchored = true |
Does anyone know what is the problem?
You must use a “for” loop. It will loop through each of the group’s children until the goal is met.
1 | local parts = workspace.Group:GetChildren() |
2 |
3 | for i,child in pairs (parts) do |
4 | print ( "anchoring a part" ) |
5 | child.Anchored = true |
6 | end |