Ai patrol with points given

Hi i having problems develop a ai, making the ai(enemy) patrolling and checking the points.
The problem is that its bug and dosent pass throw all points.
Also i wanna to change beetwen the animations i mean go to a point, change to idle state and then go to the other point and change the state to walk.
Can you help me pls i will show what i have done.
Thak you very much.

Hay @Jorge_Cantero! I made something similar for my own game. Can you show me how you did it, so I can help you solve the problems?

Hi i post you the link to what i have done, and i hope you can help me
Thank very much

I see you are using a script from another project that I helped with earlier. Because this is written from a certain idea, I advise you to start with an empty script and expand it step by step. You can always use parts from another script if these are useful to you.

This also makes you understand the script and makes it easier to adjust or add things. It also prevents errors because there are missing parts that the current scipt requires.

My suggestion is to describe your idea and perhaps how you want to achieve it. Then we can see what it takes and what problems we will encounter.