Making npc face player but not look over head

I tried to make npc face player and don’t look over head when player goes up to npc but it won’t work, it print’s this weird error:
SolidModelContentProvider failed to process because ‘could not fetch’

script.Parent.HumanoidRootPart.CFrame =, currentTarget.Position)

script.Parent:SetPrimaryPartCFrame(script.Parent.PrimaryPart.CFrame * CFrame.Angles(math.rad(0),0,0))

I don’t think that it could be that line of code that could be causing that issue? But more or less a strange Engine/Studio Bug