How do I make an AI moving script?

I’m trying to make an AI enemy that moves back and forth. The plan is that the enemy will move to the right until it collides with something, then move to the left until it collides, turn around and restart that script. I can’t get anything to work, can someone please help? Thank you :slight_smile:

1 Like

Hey @TheWatcherOfMoon! Welcome to the Flowlab Community! :slight_smile:

I have found an example of enemy movement for you.

You can hop into the editor and look at the enemy’s behaviors. You can use that to create your enemy’s movement AI.

I hope this helps you.

1 Like

Welcome

1 Like

Welcome @TheWatcherOfMoon - I recommend watching the “Obstacles & Enemies” video here as well:

1 Like