Modal Activates Even When Button Isn't Actually Visible


As you can see in the video, the button is set to visible, but isn’t shown on screen due to it’s parents being invisible. Despite this, the Modal property still activates. When I set the button to not be visible, Modal is no longer active.
SpecificInventoryTest.rbxl (64.3 KB)
This is a reduced file with only the important components, but you can see the modal property is still acting weird.

Expected behavior

Modal should not go into effect if either the button is set to not be visible or one of it’s ancestors is set to not be visible; the same system used for actually displaying gui objects on screen.

A private message is associated with this bug report

3 Likes

Thank you for the report! We’ve created a ticket to track this issue.

Hey, I’ve been experiencing this for years now. My workaround was to loop through the screengui and disable the Modal property for TextButtons and ImageButtons when it wasn’t needed. In your case, you could enable it when the inventory UI is set to visible, and disable all of them when its not visible.

Yeah I rarely have nested buttons with modal on. My solution was to just have a single button in the ScreenGui and just turn it off/on, controlling the logic 100% through the script. I think it would be best to deprecate this property and instead have it be a property for each ScreenGui, would result in better practices due to the property not working properly.

1 Like

That idea was way easier than what I had thought of lol, thank you

Do you mean a Modal property in a screengui? That seems way more smart and more practical than having every single button with a Modal property. Hopefully something is done to fix/improve this, or even add your idea. Glad I wasn’t the only person dealing with this issue.