Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Changing backgroundColor3 How?

Asked by 8 years ago

I'm having trouble with this script and Its not working, am I doing it wrong?

GUI=Frame.BackgroundColor3 = Color3.new(255,45,38)

The color I want is not showing up and actually turning it white or Black instead the color I want

2 answers

Log in to vote
0
Answered by
Pyrondon 2089 Game Jam Winner Moderation Voter Community Moderator
8 years ago

Assuming "GUI" is already set to a GUIObject, you would have to use a period to access a property, not an equals sign. Also, in Color3.new(), the values need to be between 0 and 1. You can convert RGB to this format by dividing the values by 255:

GUI.BackgroundColor3 = Color3.new(255/255, 45/255, 38/255)

Hope this helped.

0
Sorry i missed type it but thnks it works iiAngelie123 40 — 8y
Ad
Log in to vote
0
Answered by
itsJooJoo 195
8 years ago

You could instead use the Color3.fromRGB line instead:

GUI=Frame.BackgroundColor3 = Color3.fromRGB(255,45,38)

Answer this question