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

How to make a gui pop out when my mouse hovers over it?

Asked by
rexpex 45
8 years ago

I was trying to make a gun that can be picked up if clicked on. But i do not know the function for mouse hover or click. Can someone help me with this?

1 answer

Log in to vote
1
Answered by
obcdino 113
8 years ago

To check if a button was hovered on, you can use the MouseEnter event.

This won't work on parts though.

i.e

gui = game.Player.SomeDude.RandomGUI
button = gui.RandomButton
button.MouseEnter:connect(function()
button.BackgroundTransparency = 0.5 -- Makes the background transparent when you hover over the button.
end)

Hope this helped!

Ad

Answer this question