How to lock Rotation from specific axis using CFrame?

I’m trying to make a headcrab, but I ran into a problem where when I want the headcrab to not rotate in a specific axis, it wouldnt work.

I’ve tried searching around the devforum, using PropertyChangedSignal, and reseting the orientation everytime it updates, and inverting the CFrame rotation at the axis I want it to not rotate from.
The issue with PropertyChangedSignal is that it wouldnt do anything, the issue with the CFrame method is that it would do nothing, and the issue with the orientation is that it would update it incorrectly, but the next frame its messed up.

Code:

function LookAt(lookAt, speed : number, duratation : number)
	for i = 1, duratation * 100, 1 do
		task.wait()
				
		local formula = CFrame.new(script.Parent.HumanoidRootPart.Position, lookAt.Position)
		
		local newPos = script.Parent.PrimaryPart.CFrame:Lerp(formula,speed)
		
		local currentOrientation = script.Parent.HumanoidRootPart.Orientation
		
		script.Parent:PivotTo(newPos)
		
--		script.Parent.HumanoidRootPart.Rotation = Vector3.new(0,currentOrientation.Y,currentOrientation.Z)
		
	end
end

task.wait(3)

LookAt(game.Workspace.lookAtPart, .4, 40)

Explorer:

image

In-game:
(the headcrab model is the HumanoidRootPart.)