How do I make the camera face the NPC?

I am making a dialog system for my game and I want the camera to face the front of the NPC. The problem is, it doesn’t work for every rotation as shown here.

Here everything works fine:

But when the NPC is rotated the NPC the camera doesn’t rotate with it

Here is the code for the camera manipulation:

	local tween = TS:Create(camera,info,{
		CFrame =,guipart.Position.Y,guipart.Orientation.Z+5),
		Focus =, guipart.Position.Y+1, guipart.Position.Z+4.5)

Thanks for reading! :happy3:

1 Like

Try this

local target = guipart.CFrame
local cf = target + (target.lookVector * 5)
local focus = target + (target.lookVector * 4.5) 

Let me know if it works.