Just a tip if anyone else had this.
I had a bug that was bugging me. Ohhh that was bad…
The Projectile Shedder was destroying the Enemys if the path and waypoints collided with it. The simple solution was to set up a tag and check to make sure that it wasn’t an Enemy.
//using System.Collections;
//using System.Collections.Generic;
using UnityEngine;
public class Shredder : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.tag != "Enemy")
{
GameObject.Destroy(collision.gameObject);
}
}
}