while true do wait(1) script.Parent.SelectionBox.Adornee = script.Parent SelectionBox.Color3 = BrickColor.new(math.random(1,255)) end
It is supposed to randomly change color's. Any help?
script.Parent.SelectionBox.Adornee = script.Parent while true do wait(1) local randomColor = BrickColor.Random().Color script.Parent.SelectionBox.Color3 = randomColor end
This will work.
Color3 uses Color3.new(). Not BrickColor.new().
Color3 is not actually 1 to 255, it's 0 to 1. So take your number(like 125) and divide it by 255.
Color3.new(233/255,65/255,87/255)
script.Parent.SelectionBox.Adornee = script.Parent while wait(1) do SelectionBox.SurfaceColor3 = Color3.new(math.random(1,255)/255,math.random(1,255)/255,math.random(1,255)/255) end
Hope it helps!
You can get a random color though BrickColor! BrickColor.Random()
and BrickColor.Color
.
BrickColor.Random() would get a random BrickColor.
Turns the brickcolor into a color3 value
Which would make
script.Parent.SelectionBox.Adornee = script.Parent while wait(1) do SelectionBox.SurfaceColor3 = BrickColor.Random().Color end