How can I perform a click function?

hello, well I’m learning to use gdevelop and I’m working on a fnaf style game but I have a problem and it seems that the engine does not have a click function and well I saw tutorials and they recommend using the mouse function on the object and the click although it works I have an error and it is that when I pass the mouse with the click pressed the condition responds and I do not like that since it causes me many problems does anyone know a solution or how to make the click work without having that problem of passing the mouse with click.

Although slightly different to what you’re doing, this may help work out how to prevent activating a button in certain circumstances: