Enemy folowing in 2D

Hello everybody, i would like to ask you about one problem that i have.
The most popular script for enemy to follow player in 3D has this lines:

myTransform.rotation=Quaternion.Slerp(myTransform.rotation,Quaternion.LookRotation(target.position-myTransform.position),rotationSpeed*Time.deltaTime);

But if we try to do same thing with sprite, which we see from top, it looks like thisalt text

It’s turning over player and folowing him almost right, but it’s rotating by Y axis.
How can i change this lines to correct rotation?

Quaternion.LookRotation() takes an optional second parameter called ‘upwards’. The single parameter version uses Vector3.up. Typically 2D games are on the XY plane, so you want the two parameter version and want to use Vector3.forward or Vector3.back for the ‘upwards’ parameter:

myTransform.rotation=Quaternion.Slerp(myTransform.rotation,Quaternion.LookRotation(target.position-myTransform.position, Vector3.forward),rotationSpeed*Time.deltaTime);

I hope, this image will work correctly.
It should look’s like this when rotate,

[15984-unity+2013-09-30+22-22-11-38.jpg|15984]

But it’s look’s like this
[15985-unity+2013-09-30+22-21-03-41.jpg|15985]

#pragma strict

//visible vars
var Player : Transform;//player
var Speed : float;
var facingRight = false;
function Start()
{
//Make sure you tag your player with the “player” tag!
Player = GameObject.FindWithTag(“Player”).transform;
}

function FixedUpdate()
{
if ((transform.position.x >= Player.position.x) && facingRight) {
Flip ();
//transform.position = Vector3.Lerp(transform.position,Player.position,Time.deltaTime * Speed);
}
if( transform.position.x < Player.position.x && !facingRight) {
Flip ();

	}
transform.position = Vector3.Lerp(transform.position,Player.position,Time.deltaTime * Speed);	

}

function Flip(){
facingRight = !facingRight;
var theScale : Vector3;
theScale = transform.localScale;
theScale.x *= -1;
transform.localScale = theScale;
}