Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Surface Gui Random Color?

while true do

script.Parent.BackgroundColor3 = BackgroundColor3.Random()

wait(0.5)

end

I know very little about scripting, but I figured with the knowledge I have I could make this simple script. But, I guess not. Any help please?

2 answers

Close!

Color

BackgroundColor3 only works as a property, but not as a Color3 constructor. Additionally, there is no 'Random' color constructor, so you're going to have to use Random Values or the random BrickColor.

while true do
local ran1 = math.random(0,255)
local ran2 = math.random(0,255)
local ran3 = math.random(0,255)
script.Parent.BackgroundColor3 = Color3.new(ran1,ran2,ran3)
end

Or:

while true do
script.Parent.BackgroundColor3 = BrickColor.Random().Color
end

This discussion is preserved as it was. New answers, comments, and votes are closed.