How to make an enemy that follows you to the right or left and doesn’t fly

So I am making an enemy that follows you so if you’re left then it goes to the left or if you’re on the right it goes right. Now I know that there is the follow sprite thingy but that makes the enemy fly and the enemy is smaller than the player so it’s levitating. Here is a link to the game. Bc I don’t want the enemy to fly after you when you jump. I want it to stay on the ground. Help much appreciated. https://arcade.makecode.com/S67326-02387-81003-29766
The enemy is named Dumbarn and main character Poul

this is easy to do with an “on game update” block! here’s some sample code:

if you have multiple enemies in your game, you’ll need to wrap it in a “for each” loop like this:

Thanks this was what I was looking for but I messed around and made what I was looking for. Thanks for the help