Model faces the wrong way with Model:SetPrimaryPartCFrame() when animated

Hello, I have a basic problem. I’m rotating a model using Model:SetPrimaryPartCFrame(). The NPC’s head is the PrimaryPart. It doesn’t rotate the model with the head facing the target for some reason. The head is facing in the same direction as the gun.

Screenshot 2021-07-11 214415

2 Likes

I think a better way to rotate the model is to make it face that target using CFrame.new

local primaryPart = model.PrimaryPart

primaryPart.CFrame = CFrame.new(primaryPart.Position, target.Torso.Position)

This should rotate the whole model facing the target’s torso, you can replace the target.Torso with another part you want it to face if you want.