I made a dance floor today and i was able to change all of the parts colors in the model by using "In pairs" But the problem is that all of the parts just change to a random color and stay that way . I'm trying to make it to where all of them change to different colors every .1 seconds. But instead as i said above they change to a random color but stay that way . Here is the code i though would work but didn't
while true do
for _, v in pairs(workspace.TestFloor:GetChildren()) do
v.BrickColor = BrickColor.new(math.random(),math.random(), math.random())
wait(.1)
end
end
can someone please help me?

3 comments
Your script works for me.
It works fine but i'm trying to change the colors of all of the bricks every second, like a dance floor. The script only changes their color to a random one and then it stays that way.
I'm not sure by what you mean 'stay that way'. In the script you have, although it didn't error. You will have at least one part every 0.1 seccond change color. In order to change all the parts every 0.1, you'll need to move the wait command.