of     1   

tycoonfan1
#36537344Friday, November 05, 2010 6:56 PM GMT

I wanna make the script below work, so every part in it isn't the same color, but the way my script works, they all turn to the same color. Can somone tell me what to do to make each of them get a diffrent color, and give me an edited script for it? wait(0.001) local color = "Color" ..math.random(1,4) crates = script.Parent:GetChildren() for i = 1,#crates do if crates[i].Name == "Crate" then crates[i].BrickColor = game.Lighting.ContainerColors:FindFirstChild(color).Value script:Remove() end end
crazypotato4
#36537372Friday, November 05, 2010 6:58 PM GMT

wait(0.001) crates = script.Parent:GetChildren() for i = 1,#crates do if crates[i].Name == "Crate" then local color = "Color" ..math.random(1,4) crates[i].BrickColor = game.Lighting.ContainerColors:FindFirstChild(color).Value script:Remove() end end
tycoonfan1
#36537459Friday, November 05, 2010 7:01 PM GMT

Very little editing. So I need to make it pick the color after it gets all of the bricks?
crazypotato4
#36537505Friday, November 05, 2010 7:02 PM GMT

You need to make it choose a color for each brick, not choose a color and then set the bricks to that color. The color has to change for each brick.

    of     1