how to make 2d enemy do simple movement in space invaders?

hello i need help to make my enemy do simple movement for my 2d version of space invaders
for i want them to move from right to left, go down, and move from left to right and go down and so on.

Here is a coroutine to get you started. It needs to be attached to each invader. It would probably be easiest to spawn your grid of invaders from a prefab with this script attached. To test, from a default scene, create an object, attach the script and hit play.

#pragma strict

private var leftRight = 1.0;
private var down = 1.0;
private var speed = 0.5;

function Start() {
	Cycle();
}

function Cycle() {
	var dest = transform.position;
	while (true) {
		dest.x += leftRight;
		while (transform.position != dest) {
			transform.position = Vector3.MoveTowards(transform.position, dest, speed * Time.deltaTime);
			yield;
		}

		dest.y -= down;

		while (transform.position != dest) {
			transform.position = Vector3.MoveTowards(transform.position, dest, speed * Time.deltaTime);
			yield;
		}

		dest.x -= leftRight;

		while (transform.position != dest) {
			transform.position = Vector3.MoveTowards(transform.position, dest, speed * Time.deltaTime);
			yield;
		}
		
		dest.y -= down;

		while (transform.position != dest) {
			transform.position = Vector3.MoveTowards(transform.position, dest, speed * Time.deltaTime);
			yield;
		}
	}
}