Notice the fade to black when switching menus. Even if the button is completely obstructed, I can still press it just fine
Here’s the same problem but simpler
I’m using MouseButton1Click, MouseEnter and MouseLeave to detect input on each button & the Active property is always enabled (both on the button and the frame)
in the first example zindex is 1-10 for the ui and 11-20 for the prompt (including its background) so there shouldnt be any issues, in the 2nd example it’s the same
Oh wait, so your problem is the button getting fired even tho it’s “invisible”, well if that’s the case, the solution should just be to set that GUI element’s Enabled to false when it’s supposed to invisible. And that would stop interactivity with it.
I’m trying to avoid setting any properties manually considering it would be very annoying to do even if the entire ui has a shared state, and I can swear this worked at some point
How would it be annoying? This is like the bare minimum of scripting you gotta do. There is no way around it, as long as the player can hover over the button’s region, it will interact with it, be it invisible or not. There are properties explicitely made to solve stuff like this.
Frames won’t really ever sink anything, even when “active.” It is a bit of a misnomer.
You can “disable” a button by turning its Active, AutoButtonColor, and Selectable values all to false. This will cause it not to react to any input that isn’t explicitly defined by code.
Setting Active to false will prevent any code hooked to GuiButton.Activated from firing.
Setting AutoButtonColor to false will block the default on-hover effect.
Setting Selectable to false will prevent gamepads from selecting the control.
If you need a half-measure where partially-covered buttons react when clicked on the visible portion but not the covered portion, using any type of GuiButton (instead of a Frame) in front of the button will sink input (regardless if that control itself does anything with it) without requiring you to disable the overlapped button; however, the partially-covered button will still exhibit on-hover effects if AutoButtonColor is set to true.
Thanks for explaining their actual behavior. I’ll try to use the button hack or bite the bullet.
Edit: It doesn’t seem to block MouseEnter/MouseLeave, but stopping button input is good enough
having to check for .enabled would mean i’d have to dirty up every single event connection I am making eg. shove another if statement inside of it. I was assuming there is an actual implementation that stops you from pressing buttons behind FULLY opaque frames.
It really isn’t something hard to implement, just redo your stuff and you should be fine. And if buttons stopped being interactive behind fully opaque frames, that would cause some limitations, because they already gave you the option to disable the interactivity to begin with.
If you need help redoing it, you can ask for help again if you are stuck.