Rotating character vertically

I’ve been rotating the character using

CFrame.lookAt(HumanoidRootPart.Position, HumanoidRootPart.Position + direction)

While this works for horizontal directions, it’ll ragdoll my character when using diagonal/vertical values, I’m assuming this is because of some Humanoid behavior but I have no idea how to get around it.

I’ve tried:

Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)

This method does get rid of the ragdolling, but it’ll make the character instantly snap back its rotation. Which I don’t want. Do I have to edit a Motor6D to keep the vertical rotation without Humanoid interference?

I think it might just be the Humanoid not liking vertical rotation but I am not 100% sure on this. If you rotating the player without needing him to move maybe try anchoring the HumanoidRootPart before rotating then just unanchor when you’re done

Unfortunately that isn’t an option for me. My character is moving at all times since the rotation change is tied to knockback in my game

Would you mind explaining why you want to rotate your Hrp(HumanoidRootPart) vertically, maybe we can find another way to achieve your goal

The character will face the knockback direction in the game, so if said direction is vertical then I’d have to rotate the HumanoidRootPart up

Found a solution!
you just have to edit the RootJoint C0

HumanoidRootPart.RootJoint.C0 *= CFrame.Angles(math.rad(90), 0, 0)