So basically I have it where the NPC looks at the enemy when it reaches the part. I was wondering how I would stop the NPC from looking at the Enemy when I don’t want it to.
NPC.HumanoidRootPart.CFrame = CFrame.lookAt(NPC.HumanoidRootPart.Position, EnemyRootPart.Position)
What do you mean when you don’t want it to? If you don’t even want it to look at the Enemy, remove the function. If there is a condition, then use an IF THEN within the function.
I have it where whenever a player clicks on an Enemy, the NPCs walk to their positions, once in their positions they look towards the enemy. Then if the player clicks on the Enemy again, the NPC’s will follow the Player again, and not look towards the enemy. Although the NPCs do follow me, I don’t know how to make the NPC’s stop looking at the Enemy.
I just had to disconnect my function.