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

Why doesnt the background change when players mouse is on the button?

Asked by 9 years ago

I want to make the transparency change when the players mouse is on the button not clicking it just hovering it kind of thing here is the script

function MouseEnter() script.Parent.BackgroundTransparency = 0 end function MouseLeft() script.Parent.BackgroundTransparency = 1 end script.Parent:MouseEnter(MouseEnter) script.Parent:MouseLeave(MouseLeft)

1 answer

Log in to vote
3
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
9 years ago

Your connection lines aren't good. Try this.

script.Parent.MouseEnter:connect(function()
    script.Parent.BackgroundTransparency = 0
end)

script.Parent.MouseLeave:connect(function()
    script.Parent.BackgroundTransparency = 1
end)
0
Thank you :D your Awesome you deserve a medal tyronecruz12345 0 — 9y
0
Thanks for the comment. Heh, first time I got one of those. Would you mind accepting my answer (Sorry this is a bit late) Shawnyg 4330 — 9y
Ad

Answer this question