I'm making a tool that does something when you start holding down the left mouse button, and stops when you release the button.. I have it so it stops if you switch windows, let go, start typing, or press esc, pretty much everything covered, except for 1 thing..
If you release the mouse button over someone's name on the leaderboard, or some other gui button it doesn't detect the mouse up, any ideas how to get around this?
You will have to use user input instead of keydown and keyup events because that won't work everywhere, what will is the userinput script, this comes from the roblox wiki:
function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.R then print("R was pressed") end end