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 = CFrame.new(guipart.Orientation.X,guipart.Position.Y,guipart.Orientation.Z+5),
Focus = CFrame.new(guipart.Position.X, guipart.Position.Y+1, guipart.Position.Z+4.5)
})
tween:Play()
Thanks for reading!