when an enemy chases a player and crashes into a wall, he starts running on the spot

Hi, I made an enemy, but I don’t know how to fix all the mistakes, please help. I described the first problem in the title. The second is if the bot goes to a point and the player in front of it does not pay attention to the player. Below I have attached screenshots of how my bot works.



Did you make this yourself or did you use a tutorial?

Im use a tutorial. They don’t say how to fix bugs