How to make a player Orientation not be able to change axis

How can I make a player not rotate left or right just look forward always? I have this mechanic in a part of my game where a player’s default movements are disabled and they can move with custom movements I’ve made only forwards and backwards with Body velocities which works great. So now I’ve put a wall at the back of the Area I want my players in because I don’t them wandering on indefinitely and when players touch that wall they rotate a bit to the left or right offsetting their movement orientation. Can anyone help me make the player not spin a bit when hitting a wall? I’ve tried Align Orientation and changing The HumanoidStateType to FallingDown but nothing has worked for me, maybe Im doing it wrong? Idk. Thanks

did u try a loop that sets the player orientation?
like
while wait(0,1) do
humanoidrootpart.CFrame.Orientation = Vector3.new(0,0,0)
end

I havn’t worked much with AlignOrientation, but setting the MaxTorque to math.huge should keep the orientation locked.

1 Like

I feel like this is inconsistent and general bad practise. Its probably very laggy as well.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.