Making AI Ignore the y Axis

My AI script keeps moving the AI on the Y axis. I just want my enemy to move left and right, up and down (On a 2D plane) How can I make the AI ignore the 3d Up/down?

var target : Transform;
var damp = 5.0;
var speed = 3.0;

function Start () {
	// Auto setup player as target through tags
	if (target == null  GameObject.FindWithTag("Player"))
		target = GameObject.FindWithTag("Player").transform;
}

function Update () {
	if (target  Vector3.Distance(transform.position, target.position) < 30) {
		var rotate = Quaternion.LookRotation(Vector3(target.position.x, transform.position.y, target.position.z) - transform.position);
		transform.rotation = Quaternion.Slerp(transform.rotation, rotate, Time.deltaTime * damp);
		
		var controller : CharacterController = GetComponent(CharacterController);
		
		var forward : Vector3 = transform.TransformDirection(Vector3.forward);
		controller.SimpleMove(forward * speed);
	}
	
	else if (target  Vector3.Distance(transform.position, target.position) > 30) {
		
	}
}

You tell it to look at the target using Vector3s, you should instead just use the Vector2 versions of the objects so it will rotate only along the appropriate axis. To make that happen, you have a bit of work in your future, but you can handle it.

posted in the wrong place oops!