Custom Shift Lock Causing Player to Slide

I’m trying to recreate shift lock, and it seems like pivoting the pivoting the character directly causes it to slide on the ground. So far all the information I’ve found seems to be about custom rigs, I’m using the base r6 rig.

This is the code I’m using.

if not shiftLockEnabled then human.AutoRotate = true return end

	human.AutoRotate = false

	local hPos = hrp.Position
	local x,y,z = camera.CFrame:ToOrientation()
	local shiftCF = * CFrame.Angles(0,y,0) *,1.5,0)


I had this issue in my game. Its a really easy fix. Set the humanoidrootparts cframe, dont do PivotTo.

Hrp.Cframe =, lookDirectionPosition)

1 Like

Didn’t expect that to work due to it breaking characters in the past, but that worked.


Hah this post was anticlimatic. Youre welcome :pray:


Oh yeah another bug will arise with my solution. Make sure your loop for the camera or whatever is in renderstepped.
Also another bug, do not lerp the humanoid cframe

Thesd are both grave errors i spent minutes trying to fix. Minutes i could’ve spent hitting legs or going outside


Alright, thanks for the info :+1:


Found an easier solution than all of this:

UserSettings().GameSettings.RotationType = shiftLockEnabled and Enum.RotationType.CameraRelative or Enum.RotationType.MovementRelative

Not sure if it’s deprecated or not though.
Either way it works, and fulfills the same purpose while keeping truss physics working.