AI paths not working

Hey, I’m working on a 16 bit style 2D platformer and want the AI to walk from one area to another, sort of like in the early sonic games, so it moves to one area, pauses, then moves back. Can anyone tell me how to do this? I have posted a picture of what I have so far. Also, if anyone can teach me how to get it so they roam in the air instead of the ground that would be a big help. Thanks in advance, and sorry about my vagueness.
Also, I am still a beginner (as you can probably can tell) so if you can put it into simple terms, please do, else just speak as you wish.

I got the character patrolling with this and i sure u can find better ways to do it.

there are pretty good tutorials online on ai check them out.

if u got any questions let me know.

Thanks, this should be enough!