just realised i should put the code to make it easier to help
{
public GameObject Enemy;
public GameObject FoodItem;
public Slider HealthSlider;
public float maxHealth = 100;
public float currentHealth;
public Slider HungerSlider;
public float Hunger;
public float MaxHunger = 100f;
public Transform target;
public Transform Den;
public float speed = 200f;
public float NextWaypointDistance = 3f;
Path path;
int currentWaypoint = 0;
bool reachedEndOfPath = false;
Seeker seeker;
Rigidbody2D rb;
public float chaseRadius;
public float attackRadius;
void Start()
{
Hunger = MaxHunger;
currentHealth = maxHealth;
seeker = GetComponent<Seeker>();
rb = GetComponent<Rigidbody2D>();
InvokeRepeating("UpdatePath", 0f, .5f);
target = Den;
}
