Problems with Animation

Guys , what I am trying to do with the script is that when I press a button the Elevator goes up and when I press again , the Elevator goes down. I already created the animations and they are working. My problem is in the “void ChangeElevatorState”.When I remove ''ElevatorIsDown=false;" and "ElevatorIsDown=true; the animations plays perfectly but they only play once,since the do not turn false or true , but when I place them and when I press “E” the animation that plays is the “ElevatorHere.animation.CrossFade(“ElevatorGoDown”);” and not the “ElevatorHere.animation.CrossFade(“ElevatorGoDown”);” , seems that when I press “E” , the bool “ElevatorIsDown” is turning false and firing off the “ElevatorGoDown” animation , any ideas ? I am going crazy with this all day -.- .

using UnityEngine;
using System.Collections;

public class Elevator : MonoBehaviour 
{
	private bool PlayerDetected=false;
	public bool ElevatorIsDown=true;
	public Transform ElevatorHere;

	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(PlayerDetected==true && Input.GetKeyDown(KeyCode.E))
			{
				ChangeElevatorState();
			}
	}

	void OnTriggerEnter2D(Collider2D Col)
	{
		if(Col.tag=="Player")
		{
			PlayerDetected=true;
		}
	}

	void OnTriggerExit2D(Collider2D Col)
		{
			PlayerDetected = false;
		}

	void ChangeElevatorState()
	{
		if(ElevatorIsDown==true)
		{
			ElevatorHere.animation.CrossFade("ElevatorGoUp");
			ElevatorIsDown=false;
		}
		if(ElevatorIsDown==false)
		{
			ElevatorHere.animation.CrossFade("ElevatorGoDown");
			ElevatorIsDown=true;
		}
	}
}

Figured the problem out , after days of research I came up with this .
I will make it simple so people can understand .
1- I created a Script in the object with the animation with this code

public bool CanGoUp=true;
	
			

	void ElevatorLift()
	{
		
		if(!animation.isPlaying)
		{
			if(CanGoUp==true)
			{
				animation.Play ("ElevatorGoUp");
				CanGoUp = false;
			}
			
			else
			{	
				animation.Play ("ElevatorGoDown");
				CanGoUp = true;
			}
		}
	}

2-In the Object I want to call this function I simple added in the Update the following function

if(Input.GetKeyDown(KeyCode.E) && Press == true)
		{
			GameObject.Find("PlatformTest").SendMessage("ElevatorLift");		
		}

Thats it ! Simple as that . Apparently it had something to do with the Update being called all the time and the booleans were getting messed up placed inside the Update Function , also , the “if(!animation.isPlaying)” and the ‘‘else’’ made a HUGE difference too . Hope this can help you guys ! See you next time !