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 |