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

What is the easiest way to change the backroundcolor3 in a gui?

Asked by 6 years ago

local data = game.StarterGUI.PlayGUI.Frame.Attributes.BlockData1
data.BackgroundColor3.b = 0 data.BackgroundColor3.r = 85 data.BackgroundColor3.g = 225 this is what i did but its not working its saying b cannot be assigned to that's it the color im trying to make is green

0
it would be easier if you used a lua block (~~~~~~~~~~~~~ ~~~~~~~~~~~~~~) Jo_Bot 67 — 6y
0
Easier for people to read that is Jo_Bot 67 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

You can easily convert an RGB to a Color3 value using Color3.fromRGB. Simply enough, all you have to do is type the desired values into the parenthesis. Here's an example, and good luck with your game!

local Frame = Instance.new("Frame")
Frame.BackgroundColor3 = Color3.fromRGB(85, 225, 0)
-- This will set the color to the shade of green you wanted.
0
thx alot xxbrobroxx02 13 — 6y
Ad

Answer this question