Simple 2D Hero Controller Animation Question

The problem I’m running into is I’m only getting one animation to play on my hero on a keypress and it is whatever is before the else statement,

	if (Input.GetKey(KeyCode.RightArrow))
	{
		anim.SetBool("LeftorRight",true);
		anim.SetFloat("Speed",1f);
		MoveRight();
	}

	if (Input.GetKey(KeyCode.LeftArrow))
	{
		anim.SetBool("LeftorRight",true);
		anim.SetFloat("Speed",1f);
		MoveLeft();
	}
	if (Input.GetKey(KeyCode.UpArrow))
	{
		anim.SetBool("Up",true);
		anim.SetFloat("Speed",1f);
		Moveup();
	}
	if (Input.GetKey(KeyCode.DownArrow))
	{
		anim.SetBool("Down", true);
		anim.SetFloat("Speed",1f);
		MoveDown();
	}
	else{
		anim.SetBool("Up",false);
		anim.SetBool("Down", false);
		anim.SetBool("LeftorRight",false);
		anim.SetFloat("Speed",0f);
	}
}

and what I want to do obviously is have the other animations work as well. The keys work work because I am able to move the hero the only thing I am not able to do is play the animations 3 out of 4 animations

Try to set all anim.setBool you don’t need in the specific keypress to false.

  if (Input.GetKey(KeyCode.UpArrow))
     {
         anim.SetBool("Up",true);
         anim.SetBool("Down",false);
         anim.SetBool("LeftorRight",false);
         anim.SetFloat("Speed",1f);
         Moveup();
     }

if (Input.GetKey(KeyCode.DownArrow))
     {
         anim.SetBool("Down", true);
         anim.SetBool("Up",false);
         anim.SetBool("LeftorRight",false);
         anim.SetFloat("Speed",1f);
         MoveDown();
     }

and so on.