I wanted to make the player face the NPC from the front with 2 studs of distance between them for a kill animation.
The main problem is that it only works with one angle.
How it should look:
Another angle:
Here’s the code I tried:
function moveCharacter(NPC, Char)
NPC.Humanoid.WalkSpeed = 0
Char.Humanoid.WalkSpeed = 0
Char.HumanoidRootPart.CFrame = CFrame.new(NPC:GetPrimaryPartCFrame().Position + Vector3.new(0, 0, -2)) * CFrame.Angles(0, math.rad(NPC.HumanoidRootPart.Orientation.Y + 180), 0)
end
Let me know if there’s a method that works