After a few hours of research I found out how to implement pathfinding for the enemies. I added a wall to see if the enemies would go around it, the results were much better than I expected.

After a few hours of research I found out how to implement pathfinding for the enemies. I added a wall to see if the enemies would go around it, the results were much better than I expected.