help me !!!
Good day.
This is a very poor post. Loo kat at other posts… You spent 10 seconds posting this, and expect someone start coding and give you the answer by spending 10 minutes of its time whn you did not spent that time…
Very bad.
Leran to code, use a simple foreach…
goodbye
Transform coin;
//PlayerHealth playerHealth;
//EnemyHealth enemyHealth;
UnityEngine.AI.NavMeshAgent nav;
void Awake ()
{
coin = GameObject.FindGameObjectWithTag(“Money”).transform;
//playerHealth = player.GetComponent ();
//enemyHealth = GetComponent ();
nav = GetComponent <UnityEngine.AI.NavMeshAgent> ();
}
void Update ()
{
//if(enemyHealth.currentHealth > 0 && playerHealth.currentHealth > 0)
//{
nav.SetDestination (coin.position);
//}
//else
//{
// nav.enabled = false;
//}
}