How do I make a moving enemy in 2d?

Godot Version

Godot 4


how to script it?
Its sidescroll btw

You add a script to it and override _process() to tell it how to move.

can you write that script for me?

Is this a good script?

Any script is a good script if it does what you want it to do and does not what you don’t want it to do.