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

How do you change the colour of a Gui?

Hi, first off Happy easter. I always come across this problem when ever I am doing something with GUI's and decided to ask you guys about it. When I am trying to change the colour of a GUI (like a frame or textbox), I get this error message

(Color3 expected, got number)

I tried using

Frame.BackgroundColor3 = Color3.new(255,255,255) 

or

Frame.BackgroundColor3 = "Red"

or

Frame.BackgroundColor3 = 96, 200, 11

and a bunch of other methods that all fail, and I just don't get it. Can someone tell me the correct way to change the background colour of a gui

2 answers

✓ Accepted answer

For the Color3, use Color3.fromRGB. For "Red" use BrickColor.new

Frame.BackgroundColor3 = Color3.fromRGB(255,255,255)
Frame.BackgroundColor3 = BrickColor.new("Really red")

2 comments

0

Cheers, the top one worked. Thanks a ton Velocity

0

Frame.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255) also works but it's the same thing as fromRGB

This did not work because you did not specify Frame.

Frame.BackgroundColor3 = Color3.new(255,255,255)

2 comments

0

That is the same code that he used.

0

In my actually code, the frame is specified I just left it unspecified here because its a shorter code.

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