I’m making a sort of shift lock which is making the CFrame of a player’s humanoid root part point to the mouse.Hit.p
Problem is, It also affects Y axis which is orientating the players up and down, that’s really glitchy.
I didn’t find anything on the internet regarding to this specific problem.
If you know anything about the CFrame.lookAt, this is self-explanatory.
The only problem you could be facing with this is also shift-locking any vehicles you sit in, which can be fixed by not setting CFrame if the character’s humanoid is seated.
You can also simplify this code by storing plr.Character.HumanoidRootPart in a variable:
Going off of @goldenstein64’s idea you may want to put a BodyGyro in the character’s HumanoidRootPart, and update the BodyGyro.CFrame instead of the HumanoidRootPart.CFrame to allow the player to walk.