How does Roblox handle movement for shift lock?

Hi, I am creating a custom movement script. I am curious to know how Roblox handles movement while a player is in shift lock.

So far I have been unsuccessful by skimming through the PlayerModule and its child scripts. Additionally, a google search and dev forum search have not yielded anything valuable.

All insight is valuable. Thanks.

2 Likes

You can find the CoreScript for the shift-lock controller here: https://github.com/Roblox/Core-Scripts/blob/master/PlayerScripts/StarterPlayerScripts/CameraScript/ShiftLockController.lua

1 Like

Unfortunately, that file does not contain anything about how movement is handled.

However, that gives me an idea: I am going to comb through the Keyboard file a little more closely.

The controller invokes the RootCamera CoreScript for the actual functionality excluding the GUI. https://github.com/Roblox/Core-Scripts/blob/master/PlayerScripts/StarterPlayerScripts/CameraScript/RootCamera.lua

After combing through the Keyboard file, I think the :Move() method is the only way characters move, regardless if shift lock is on or not.