When my enimes hit below 0 health I want them to be set inactive for a couple seconds then active again, I can not for the life of me get this to work.. I need help (IN C##)
Heres the simple code I have.
public void respawn() {
transform.position = respawnhere;
transform.active = true;
}
public void despawn() {
transform.active = false;
}
IEnumerator Example() {
despawn();
yield return new WaitForSeconds(35);
respawn();
}
↧