Don't Have Mouse Events Fire if a Gui Object is on Top of Another Gui

(I am unsure if this is a bug, if it’s functioning as intended, or if it’s just an oversight)

As a Roblox developer, it is currently too hard to make it so that only the gui with the greatest zindex in a given area can be clicked/pressed. What do I mean by this? When you click or press a gui button, no matter if it’s below another gui or above said gui, the mouse events for it fire. This behavior allows you to click buttons that are under frames and other buttons.


As an example, I am making a computer desktop with icons. When a webpage is open (which is a frame with active set to true) and it is over the icons, the mouse events for the icons still fire, even though from a user perspective they should not be able to.

Gif of this happening

pleasehelpmerolox
The frame should (from my perspective) block the input from the mouse from the icon(s) below it, but doesn’t.


I am unsure if roblox would be able to address this issue in a way that would be efficient, but if so, it would make dragable gui creation a lot less painful.

Edit: sentence fragment that was corrected
~~

Nevermind I was being stupid and didn’t realize text buttons blocked input

3 Likes