Issues rotating a character to where it's walking

i’m trying to make something which would rotate everything but the root part towards where the player is walking regardless of them being or not being in shift lock (would be thankful if somebody also helped me cap the degree for it)

currently it’s looking like this and i can’t figure out how to fix it
image

my snippet of code:

local root=script.Parent:WaitForChild("HumanoidRootPart")local human=script.Parent:WaitForChild("Humanoid")
local ogc0=root:WaitForChild("Root Hip").C0 game:GetService("RunService").RenderStepped:connect(function()root['Root Hip'].C0=
ogc0*CFrame.new(Vector3.new(),root.CFrame.LookVector):ToObjectSpace(CFrame.new(Vector3.new(),human.MoveDirection))
end)

script goes to starter character scripts & is intended for R6

1 Like