Character rotation offset wrong

Hello Developers!

Recently I’ve ran into a weird bug which is that when I leave my lock on target camera mode the normal third person camera code has this werid offset issue. The character is still rotating, just offset. I’m assuming that it has to do with something of this section of code but I can’t figure it out.

		local StartCFrame = CFrame.new((HumanoidRootPart.CFrame.Position)) * CFrame.Angles(0, math.rad(CameraAngleX), 0) * CFrame.Angles(math.rad(CameraAngleY), 0, 0)
		local CameraCFrame = StartCFrame:ToWorldSpace(CFrame.new(1.5, 2, 10))
		local CameraFocus = StartCFrame:ToWorldSpace(CFrame.new(1.5, 2, -10000))
		Camera.CFrame = CFrame.new(CameraCFrame.Position, CameraFocus.Position)

Video

Is it because the CameraFocus is offset on the x axis by 1.5?

No its the rotation of the character is acting weird. The offset is for the camera so it’s like shiftlock.