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

How to change color of textButton Text when your mouse hovers?

Asked by 8 years ago
Edited 8 years ago
function onHover()
    script.Parent.FontSize = "Size60"
    script.Parent.TextColor3 = script.Parent.TextColor3.new(124, 0, 0)
end

script.Parent.MouseEnter:connect(onHover)

function offHover()
    script.Parent.FontSize = "Size48"
end

script.Parent.MouseLeave:connect(offHover)

Alright so the only line that I need help with here is line 3, because I have no clue what I would write there to change the color :/ thanks for help in advance!

1 answer

Log in to vote
1
Answered by
rexbit 707 Moderation Voter
8 years ago

TextColor uses Color3.new. So, changing it to script.Parent.TextColor3 = Color3.new(124, 0, 0) would be legit in the style.

Ad

Answer this question