The code picks a spot near the enemy so it sometimes goes to the other side of the wall. Next time ill make the coins/items appear right where the enemy dies