Right-clicking after using LockCenterMouse makes the mouse jump

In Studio, when I lock my mouse to the center of my screen (using LockCenterMouse in a client-side script) and right-click, my mouse jumps off the screen, near the bottom-right corner of the main game screen.

When I bring my mouse back to the game screen, it re-locks to the center of my screen, but the camera jumps significantly. The video below demonstrates the full effect. The mouse disappears when I right-click, because I cannot seem to record the mouse outside the game window.

To repro the bug:

  • Create an empty baseplate.
  • Create a client-side script with the following code:
game.UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
  • Play the game and right-click.

Some developers on my game design team have not had this issue, leading me to believe this problem only affects a subset of Studio developers.

Thank you for any help you can provide! Please let me know if I need to send anything else!

Thanks for the report! I filed a ticket in our internal database and we’ll follow up when we have an update for you.

1 Like