Mouse click on gui detection

Hey guys, I know there’s an API for this - but how can I tell whether a click is on a gui obect or a world object? I had a script that did this but I removed it. I could really use it now :stuck_out_tongue: Thanks!

A little more detail was that it would return true if the click was on a gui object, and false if it was not. Thanks!

Well, Mouse.Button1Down won’t fire if the mouse was over a GUI, and UserInputService.InputBegan has two arguments: inputObject, and gameProcessedEvent, which is true if the mouse was over an active GUI, false otherwise.

4 Likes

I think this was it - thanks!