item = self:findNearestItem(“Chest”)
enemy = self:findNearestEnemy()
– Check the distance to the nearest enemy.
if distance = self:distanceTo(enemy) <10
– If it comes closer than 10 meters, cleave it!
could someone tell me why its happening and how to fix it? im not understanding why its not working