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?
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!