Modal property doesn't work properly under certain circumstances

If I understand this correctly, the Modal property when enabled is intended to disable mouse lock in first person. I’ve used this property in GUIs to do this exact thing.
However, at some point, the property disappeared entirely and mouse lock was no longer being disabled.
The property has since returned, but it does not do anything.

Update: I’ve since sent a repro file below and it seems that the button’s properties affect whether or not Modal works. See replies.

Video:


image

Expected behavior

  • When the Modal property in a visible TextButton or ImageButton is enabled, the camera should not be locked to the mouse cursor when in first person.
  • When the Modal property in a TextButton is enabled and it is inside a ScrollingFrame that is not visible, the camera SHOULD be locked to the mouse cursor when in first person.
6 Likes

I thought it was gone too, I’m glad it wasn’t just me with this issue. Ive had to deal with this, and had to enable the CameraLock camera type for computer users so they could move their mouse when in first person instead, which does work, but they still have to right click to enable it. Very annoying. If this isn’t a bug can someone please provide an explanation…

3 Likes

Any updates? It’s been about a month.

Still no response to this bug report…

Modal has always worked fine for me. You should submit a repro file if it doesn’t work for you.

No use if Roblox won’t even bother to respond… but think you can help me out instead?
gui.rbxm (3.9 KB)

Weird. I tested your gui button and Modal only worked on it after I set the AnchorPoint to [0, 0] and the Position to [0, 0, 0, 0]. That seems like the bug.

For my own Modal usage, I usually just have one singular “background” element with Modal enabled on it, instead of enabling Modal on individual buttons. Maybe you could do something like that, or perhaps have some invisible non-clickable Modal button somewhere in your gui. That way you won’t have to keep track of a bunch of different buttons that may or may not have Modal enabled on them (since you might not always want the mouse to be unlocked)

1 Like

Seems if a modal buttons AbsolutePosition Y axis comes within 58 pixels of the bottom of the screen the modal effect stops applying. Modal buttons also apply in scrolling frames when scrolling frame is not visible!

1 Like

Thanks, I’ve updated the original bug report post.