Reproduction:
- Insert a ScreenGUI into StarterGUI (we will call this ScreenGUI A)
- Insert another ScreenGUI as a child of ScreenGUI A (we will call this ScreenGUI B)
- Insert an ImageLabel as a child of ScreenGUI B
- Set
Modal
of the ImageLabel toTrue
- Press F5 to enter test mode.
- Use the mouse wheel to scroll into first-person mode.
Notice how your mouse is unlocked.
- Now, set the
Enabled
property of ScreenGUI B toFalse
Notice that the ImageLabel is no longer visible, but your mouse is still unlocked.
- Now, set the
Enabled
property of ScreenGUI A toFalse
Notice how now your mouse is now locked.
Expected behavior
The Modal
property of a button should only free the mouse if the button is visible on screen.