Make character strafe left/right instead of rotate left and right when pressing A or D

Hey there. I’m trying to make a custom camera for my game, very similar to shift lock mode. I’ve run into an issue, though. When I press the A or D key my character will rotate left and right (respectively), instead of strafing like with shift lock enabled. This is what I mean:

My version:
robloxapp-20200525-2202404.wmv (1.2 MB)

Roblox shift lock (intended functionality):
robloxapp-20200525-2203238.wmv (1.3 MB)

I’ve searched for a solution for this but have not found one. I’ve also looked into action binding and what not but I didn’t find anything relevant to my issue.


1 Like

You can have the rotation of the HumanoidRootPart match that of the camera.

local CAMERA = workspace.CurrentCamera;
local UP_VECTOR =,1,0);

local hrp = ...;--Define the HumanoidRootPart

    hrp.CFrame = CFrame.fromMatrix(hrp.Position,CAMERA.CFrame.RightVector,UP_VECTOR);