Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change the key for shiftlock?

Asked by 3 years ago

I have a shift to run but it overlaps with shiftlock and i want it to change a different key.

0
but its called shiftlock for a reason srimmbow 241 — 3y
0
you could change the sprint to a different key or just disable shift lock in that game srimmbow 241 — 3y

1 answer

Log in to vote
2
Answered by 3 years ago
Edited 2 years ago

It's actually really easy

1. Test your game in studio

It can be an empty baseplate, or it can be your actual game

2. Copy PlayerModule

PlayerModule is located in the Explorer under StarterPlayer > StarterPlayerScripts

3. Stop testing

What I like to do is press Alt+F4, and boot up studio again.

4. Paste PlayerModule into StarterPlayerScripts

Put the PlayerModule back where you found it

5. Open MouseLockController

MouseLockController would be located at StarterPlayer > StarterPlayerScripts > PlayerModule > MouseLockController

6. Go to line 28 of MouseLockController

If you have a mouse, just put your finger on the middle button and move your elbow backward while applying a small downward force

7. Edit the line

You should see

self.boundKeys = {Enum.KeyCode.LeftShift, Enum.KeyCode.RightShift}

Change that to whatever you like. All KeyCodes here.

8. Go to line 41 of MouseLockController

If you instead have a touchpad, put two fingers (horizontally aligned) on the touchpad and move your elbow forward while applying a small downward force

9. Edit the line

You should see

boundKeysObj.Value = "LeftShift, RightShift"

Change that to whatever you like. All KeyCodes here.

And you're done

Ad

Answer this question