So I'm trying to detect if the Surface GUI has been clicked in x amount of time (let's just say 5 seconds). If it is idle for x amount of seconds, then the GUI resets (I have that code done). I have no idea, I tried doing mouse.Idle() but that would be for the mouse, not the gui. Also the mouse is always idle when not moving, so that wouldn't work.
I mean, here is the code I tried, but its with mouse.Idle() that I know doesn't work
if mouse.Idle() then Reset() end
Any tips or events I can do to detect it? Thanks
I did look at the object browser but no luck
if mouse.Idle then Reset() end
But make sure that you actually have that in a function or something if you want it to work. Otherwise, you'll wanna do:
mouse.Idle:connect(function() Reset() end)
I suggest you use the one above to detect if the mouse is idle.