Player facing mouse stuttering

Hello, I’m optimizing my weapons system, I put the function for the player to look where the camera is pointing, the problem comes when the player points and moves, when the player does this his character does a kind of stuttering, but when does the same without moving the player rotates perfectly

my code here:

local x, y, z = workspace.CurrentCamera.CFrame:ToOrientation()
		
		local facing = CFrame.new(self.Rootpart.Position) * CFrame.Angles(0, y - .3, 0)
		self.FaceCFrame = facing
		self.FaceCFrame *= CFrame.new(0,0,-15)

		self.Rootpart.CFrame = self.Rootpart.CFrame:lerp(CFrame.new(self.Rootpart.CFrame.Position, Vector3.new(CFrame.new(self.FaceCFrame.Position).X, self.Rootpart.Position.Y, CFrame.new(self.FaceCFrame.Position).Z)), GeneralSet.LerpValue.Value)
		
1 Like

Make sure you go to the players Humanoid and disable AutoRotate, this could be the potential problem.

2 Likes

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