I used some guy's Technique to do this, however, He has a part when it said:
--look at character until it leaves or goes behind repeat p = head.Position pos = ppart.Position head.CFrame = CFrame.new(p,pos) wait(1/20) until ( (pos-p).magnitude > radius ) or ( rotationDifference(cf , head.CFrame ) > 1.25 ) head.CFrame = (cf-cf.p)+p --old rotation break end
And I didn't want it to Stop when I go behind. So can any of you guys please help me?
--ChannelRansom_Yt
It's actually really easy, there is a hidden argument in CFrame.new, called "lookAt".
Here's an example how to do it:
while wait() do head.CFrame = CFrame.new(Vector3.new(head.Position.X, head.Position.Y, head.Position.Z), Vector3.new(targetPlayer.HumanoidRootPart.X, targetPlayer.HumanoidRootPart.Y, targetPlayer.HumanoidRootPart.Z)) end
The NPC's head will now "look at" the desired player's HumanoidRootPart constantly.