Two Cloned Objects with the same Animator, only one object's transitions work

I followed this tutorial of making enemy ai:

But when I try to clone the object, the clone does not switch animation state. But when I delete the original and leave only the clone, it works. Why is it only one works at a time? The movement works, just not the animation transitions. Am I doing something wrong?

Here’s the code:

using UnityEngine;
using System.Collections;

public class EnemyBehaviorScript : MonoBehaviour {

	public Transform Player;
	public float LookSpeed;
	public float MovementSpeed;
	public float LookDistance;
	public float AttackDistance;
	static Animator anim;
	Vector3 direction;

	void Start () 
	{
		anim = GetComponent<Animator> ();
	}

	void Update () 
	{
		direction = Player.position - this.transform.position;
		direction.y = 0;

		if (Vector3.Distance (Player.position, this.transform.position) < LookDistance) 
		{
			this.transform.rotation = Quaternion.Slerp (this.transform.rotation, Quaternion.LookRotation (direction), LookSpeed);
			if (direction.magnitude > AttackDistance - 0.5f) {
				anim.SetBool ("isWalking", true);
				anim.SetBool ("isAttacking", false);
				anim.SetBool ("isIdle", false);
				this.transform.Translate (0, 0, MovementSpeed*Time.deltaTime);

				if (direction.magnitude < AttackDistance) 
				{
					anim.SetBool ("isWalking", false);
					anim.SetBool ("isAttacking", true);
					anim.SetBool ("isIdle", false);
				}
			}
		}
		else 
		{
			anim.SetBool ("isWalking", false);
			anim.SetBool ("isAttacking", false);
			anim.SetBool ("isIdle", true);
		}
	}
}

I think the error might be that you have the Animator as a static variable. Static variables are shared through all instances of a class, so all instances of your class can only set animator-parameters for the animator of one gameobject. Thats why the other copies do not translate between animations. Try making the anim a private variable.