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?
I believe theres an option for BrickColor.Random()
http://wiki.roblox.com/index.php?title=BrickColor
while wait(.1) do --Move the wait here for the loop to have all the parts change colors every 0.1 seconds. for _, v in pairs(workspace.TestFloor:GetChildren()) do v.BrickColor = BrickColor.Random() end end