I am making a game, I need to know how to do that.
TextButton
s and ImageButton
s have the MouseButton1Down
event which fires when they are clicked. You can have your other code run from that event:
1 | Button.MouseButton 1 Down:connect( function () |
2 |
3 |
4 | end ) |
sure. (put this script in the button for it to work)
1 | script.Parent.MouseButton 1 Down:connect( function () |
2 | -- Put code here |
3 | end ) |