I am making a game with multiple buttons, which i cannot make an onclicked script for all of them as this would be very inefficient. What I need is to find out if the mouse is clicking any sort of button.
I have thought of looking for if the mouse clicks and then finding what it is clicking, but I don't know how to do this with gui. I have done this in 3d previously with mouse.Target.
If anyone could explain how this could be done, I would appreciate it.
Clicking with a brick is much different than a gui and you can use multiple different ways to getting the mouse clicks by using the events in here http://wiki.roblox.com/index.php?title=API:Class/GuiButton