I am experiencing a bug that when the player used to face something with CFrame, it sometimes annoyingly teleport the player into the mouse or sometimes it would face the mouse.
player.Character.PrimaryPart.CFrame = CFrame.new(player.Character.PrimaryPart.CFrame.Position, Vector3.new(mouse.p.X, player.Character.PrimaryPart.CFrame.Position.Y, mouse.p.Z))
(Did not add the identifiers, this is just a piece of code that I put) It abnormally teleports the player in the mouse. Is there anything you notice in the script? The PrimaryPart was the head. The same goes for when I use HumanoidRootPart.
Im not sure how you got that one line to work without getting an error because mouse.p is not a thing mouse.Hit.p is. you can try my code
player.Character.PrimaryPart.CFrame = CFrame.new(player.Character.PrimaryPart.CFrame.Position, Vector3.new(mouse.Hit.p.X, player.Character.PrimaryPart.CFrame.Position.Y, mouse.Hit.p.Z))