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

How To Change BackgroundColor For A TextButton?

Asked by 4 years ago

script.Parent.BackgroundColor3 = Color3.new(255, 0, 0)

It doesnt work, and i have no experience. Do I have to change something in the Color3.new? I don't know!

1 answer

Log in to vote
1
Answered by 4 years ago
Edited 4 years ago

Try using Color3.fromRGB(Red,Green,Blue) instead of Color3.new(Red,Green,Blue).

local TextButton = (script.Parent:IsA("TextButton") and script.Parent) or script:FindFirstAncestorOfClass("TextButton")
TextButton.BackgroundColor3 = Color3.fromRGB(255,0,0)
0
Lemme check. UltraMegaVicninja 4 — 4y
Ad

Answer this question