Got some problems with my 2D IA

Hello guys , i’ve recently started a project of a short 2D game where you have to defend yourself against waves of ennemys but i’m not able to make a fine working IA
i’v tried many differents ways but no one worked (well one of them worked but not fine at all)
So i was wondering if someone already achieved to make an IA who is able to run to the player and follow him until her or the player died
By the way , the IA i achieved to do by following some tutorials was passing through blocks and even flying so it definitively wasn’t the right way to do it properly
Here a screenshot of it:
http://prntscr.com/dn4lfk

I’m really sorry if my english is somehow horrible , i’m still studying it.
Have a nice day
Edit : Even with a Behaviour Tree this still isn’t working