How would I go about making a button for shiftlock?

I want to make a textbutton to enable shiftlock, just a button.
Most feedback I got on my game is about a shiftlock button.

The default camera module has a MouseLockController you can access through a tree starting in the PlayerModule. It has methods to get/set/toggle/connect to the current mouse lock status. You can connect a button’s activation event to the controller’s :OnMouseLockToggled() method.

This controller is not created if UserInputService.TouchEnabled is true. If you want to have similar functionality on mobile, either fork the default scripts and remove the if statement or manually create and assign the controller if it doesn’t exist.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.