I need a Simple IA to follow my player using nav mesh… But the IA must to respawn and start follow the Player. i Don’t know how to do it whit out a public transform. I was usign this script but y can’t create/spawn the Enemy IA because the public transform where must to be te player is empty… Please helppp
place this on the enemy
public Transform goal = playerName.position;;
void Update() {
NavMeshAgent agent = GetComponent<NavMeshAgent>();
agent.destination = goal.position;
}