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

my gui script not working?

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

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).

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