using UnityEngine;
using System.Collections;
public class death : MonoBehaviour {
Transform curTransform;
void Start(){
curTransform = gameObject.GetComponent();
curTransform = gameObject.transform;
}
void Update(){
EnemyHealth eh = gameObject.GetComponent();
eh.GetComponent();
eh.health = 0;
}
GameObject Wolf_run;
void Updatetwo(){
Destroy(gameObject);
}
}
the script does not do anything when the enemy reaches 0 health I want the enemy to be destroyed when it reaches zero health. im very new to coding
↧