Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Finding out if mouse is clicking anything?

Asked by 7 years ago

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.

1 answer

Log in to vote
0
Answered by
yyyyyy09 246 Moderation Voter
7 years ago

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

Ad

Answer this question