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

I have a GUI where you are able to pick colors as the top bar, but the color wont change?

Asked by 4 years ago
Edited 4 years ago

Okay, So, I am currently making a GUI and I have buttons with different colors. Once you click a button then the TopBar on the GUI will turn into that specific color.

My code that I have currently is

For Red

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.TopBar.BackgroundColor3 = Color3.new(255, 5, 5) --Red
end)

For Default Color

script.Parent.MouseButton1Click:Connect(function()
    script.Parent.Parent.TopBar.BackgroundColor3 = Color3.new(255, 138, 20)
end)

Please help me!

1 answer

Log in to vote
0
Answered by 4 years ago

try Color3.fromRGB

color3.new requires you to divide by 255.

color3.fromRGB(255,138,20)

if this helped, click accept, I am very rep hungry xd

0
Thanks! It worked! yealetFNG 4 — 4y
Ad

Answer this question