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

my gui script not working?

Asked by 10 years ago
function onEnter()
    script.Parent.BackgroundTransparency = 0.7
    if --i dont know what goes here
        then script.Parent.BackgroundTransparency = 1
    end
end
script.Parent.MouseEnter:connect(onEnter)

this script is so thatwhen the mouse enters the gui the transparency will change, i dont know how to revert it back though, any ideas

1 answer

Log in to vote
0
Answered by
User#2 0
10 years ago

Just like there's a MouseEnter event, there's also a MouseLeave event for (most) GUI objects.

The simple fix is to have a second connection (script.Parent.(EventName):connect thing).

Ad

Answer this question