Modal TextButtons inside an invisible ScrollingFrame prevent mouse from being locked

Reproduction Steps

Reproduction:

  • Create an empty place file
  • Create the following instance hierarchy in StarterGui: ScreenGui → ScrollingFrame → TextButton
  • Set ScrollingFrame.Visible = false and TextButton.Modal = true
  • Start Play Solo and try to use first person mode

This bug happens in live games and the steps can be done anywhere at anytime so long as the end result when playing the game is the instance hierarchy given above (Invisible ScrollingFrame → Modal TextButton).

Expected Behavior

Because the ScrollingFrame is invisible the child TextButton’s Modal property should have no effect on gameplay. The mouse should be able to lock according to UserInputService.MouseBehavior, so first person and shift lock camera modes should be working correctly.

Actual Behavior

The mouse is prevented from being locked, so first person and shift lock camera modes do not work correctly. (More generally, UserInputService.MouseBehavior won’t have any effect.)

Workaround

Set ScreenGui.Enabled = false, parent the TextButton to something other than a ScrollingFrame, set TextButton.Modal = false, etc.

Issue Area: Engine
Issue Type: Display
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2022-08-18 12:08:00 (+12:00)

1 Like

Thanks for the report! We’ll follow up when we have an update for you.

1 Like