Help! the enemy incline when attacks player

I add to script to Model with animation

But the enemy incline

Look:

[38450-sin+título.jpg|38450]

[38451-sin+título.jpg|38451]

the IA enemy script requires audio source adn Fps Input controller

this is:

var Distance;
var Target : Transform;
var lookAtDistance = 25.0;
var chaseRange = 15.0;
var attackRange = 1.5;
var moveSpeed = 5.0;
var Damping = 6.0;
var attackRepeatTime = 1;
var TheDammage = 40;
private var attackTime : float;
var controller : CharacterController;
var gravity : float = 20.0;
var Troll : AudioSource;
var Zombie : GameObject; //The Model who contains the animations
private var MoveDirection : Vector3 = Vector3.zero;

function Start ()
{
	attackTime = Time.time;
}

function Update ()
{
	if(RespawnMenuV2.playerIsDead == false)
	{
		Distance = Vector3.Distance(Target.position, transform.position);
		
		if (Distance < lookAtDistance)
		{
			lookAt();
		}
		
		if (Distance > lookAtDistance)
		{
			
		}
		
		if (Distance < attackRange)
		{
			attack();
		}
		else if (Distance < chaseRange)
		{
			chase ();
		}
	}
}

function lookAt ()
{
	var rotation = Quaternion.LookRotation(Target.position - transform.position);
	transform.rotation = Quaternion.Slerp(transform.rotation, rotation, Time.deltaTime * Damping);
}

function chase ()
{
	Troll.Play();
	Zombie.animation.Play("Walking", PlayMode.StopAll);
	moveDirection = transform.forward;
	moveDirection *= moveSpeed;
	
	moveDirection.y -= gravity * Time.deltaTime;
	controller.Move(moveDirection * Time.deltaTime);
}

function attack ()
{
    Zombie.animation.Play("Attacking", PlayMode.StopAll);
	if (Time.time > attackTime)
	{		
		Target.SendMessage("ApplyDammage", TheDammage);
		Debug.Log("The Enemy Has Attacked");
		attackTime = Time.time + attackRepeatTime;
	}
}

function ApplyDammage ()
{
	chaseRange += 30;
	moveSpeed += 2;
	lookAtDistance += 40;
}

Help me please :frowning:

Probly center of player is higher than that of the enemy so as they get closer the angle increases.
Try this.

Vector3 lookpos = Target.position;
lookpos.y = transform.position.y;
var rotation = Quaternion.LookRotation(lookpos - transform.position);