Make enemy move up and down

I am building a game with a dog collecting bones and have used code to move an enemy from left to right.
but would like to add an enemy that moves up and down instead and was wondering how you can do that.

The code i use for left to right is this

any help greatly appreciated

If you want to use the same system for the other enemy, then the angles of the force should be 90 for down and 270 for up.

1 Like