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

Why is this scripting not changing the gui?

when I hover over a textbutton, The color I want is not showing. I dont know why and I check and tried everything I could with this. All I want to do is make the textbutton background color orange and the textlabel color black.

local orange = Color3.new(255, 154, 12)
local white = Color3.new(255,255,255)
local black  = Color3.new(0,0,0)
function menu()
	wait()
	script.Parent.BackgroundColor3 = orange
	script.Parent.TextLabel.TextColor3 = black
	script.Parent.BackgroundTransparency = 0

end
script.Parent.MouseEnter:connect(menu)





function change()
	script.Parent.BackgroundTransparency = 0.5
	script.Parent.BackgroundColor3 = black 
	script.Parent.TextLabel.TextColor3 = white
end
script.Parent.MouseLeave:connect(change)

https://gyazo.com/02ef7d1082c13a9a21a2c1b3379b67cb -- The explorer view.

https://gyazo.com/4665908d98dfac42214f64bcb7624b2b -- What it looks like when I use the script

1 answer

✓ Accepted answer

local orange = Color3.new(255, 154, 12) should be local orange = Color3.new(255, 154/255, 12/255), reason being that Color3 is [0-1] instead of [0-255]

1 comment

0

thanks. You are awesome.

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