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:
Button.MouseButton1Down:connect(function() end)
sure. (put this script in the button for it to work)
script.Parent.MouseButton1Down:connect(function() -- Put code here end)