How to rebind shift-lock

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I’m making a movement-based RPG game, and I wanted to leave shift clear for sprinting, but still allow the player to shift lock by pressing Control or some other button, like in Mortem Mentallum.

  2. What is the issue? Include enough details if possible!
    I don’t have any idea how to do this.

  3. What solutions have you thought of so far?
    I haven’t dealt with shift-lock enough to know how to rebind it. I really only know how to disable it.

Simple, instead of disabling it by setting shift lock enabled to false, just set it to true!

Yeah, but how do I rebind it? Sorry if it was confusing.

You can rebind the keys using the “BoundKeys” StringValue inside the MouseLockController module found in: Player → PlayerScripts → PlayerModule → CameraModule → MouseLockController.

The MouseLockController module actually automatically updates the keybinds when this StringValue changes. I believe that the MouseLock will still activate/deactivate even if the user has turned off MouseLock in their game settings, or if you have set DevEnableMouseLock to false, but just bear in mind that I might be wrong on that; although it did seem to work for me in Studio:

image

image

4 Likes

Ok, thanks for your input! I will try that.