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.

4 comments
actually the code is inside of the remote event
actually the code is inside of the remote event
actually the code is inside of the remote event
what is the full script