I have a script that is supposed to move three parts down at the same time since they are all named, 'test'. However, it only moves one part down. If I change it to make the color to red, it happens to all of them, whenever I try to make it move slowly down, it only happens to one of them. This is my script:
for _, child in pairs(game.Workspace.test:GetChildren()) do
-- Filter out non-part objects, such as Shirt, Pants and Humanoid
-- R15 use MeshPart and R6 use Part, so we use BasePart here to detect both:
if child.Name == "test" then
while true do
child.Position=child.Position+Vector3.new(0,-0.1,0)
wait(.1)
end
end
end
Only one part moves: https://gyazo.com/ec4688569c7a2a8abc2e8353d7fb6319
But if I make it
child.BrickColor = BrickColor.new("Really red")
It works for all of them, please help!

1 comment
It has to do with the loop. It keeps running the loop and doesn't move on to the next line of code until the loop ends. Try using break