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?
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 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)
#Final Product
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!
#Other Stuff
You can get a random color though BrickColor! BrickColor.Random() and BrickColor.Color.
#BrickColor.Random() BrickColor.Random() would get a random BrickColor.
#BrickColor.Color 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
No work :(
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Replace Color3 With SurfaceColor3, if it works, please accept!
I edit mine