Hello,
I have an enemy with multiple box colliders and an enemy script. What I need to happen is when the enemy dies, all the box colliders get destroyed (I am using Unity 2020.1.1f1 and Visual Studio 2019). here is my script:
using UnityEngine;
public class Enemy : MonoBehaviour{
public Animator death;
public float health = 50f;
public void TakeDamage(float amount)
{
health -= amount;
if (health <= 0f)
{
Die();
}
}
void Die()
{
death.SetTrigger("IsDead");
}
If anyone could help it would be GREATLY appreciated.