Animation not working with 2 Buttons?

Hi guys , I am creating my own 3rd Person character controller.
I have two transform points in my game and I rotate toward them by pressing a button , I’ve also set an animation “Walk” when the buttons and pressed down else it will be “Idle” animation.

The problem is , when I’ve set 2 buttons for rotating the character toward points , my walk animation does not work!
However , it works perfectly fine with only 1 button set.
For example , I’ve set Left Arrow to move toward Point 1 and Right Arrow to move toward Point 2, in this case walk animation doesn’t play.

using UnityEngine;
using System.Collections;

public class Movement : MonoBehaviour {

	public int moveSpeed;
	private Vector3 mover;
	public Animation walk;
	public int health;
	public int rotationSpeed;
	public Transform[] rotationPoints;

	public AnimationClip[] animations;
	public int currentXPoint;
	// Use this for initialization
	void Start () {

	
	}
	
	// Update is called once per frame
	void Update () {
		mover = new Vector3 (Input.GetAxis ("Horizontal"), 0, Input.GetAxis ("Vertical"));
		rigidbody.AddForce (moveSpeed * mover);
		
	    if(Input.GetKey(KeyCode.RightArrow))
		{
			animation.Play("Armature|Walk");
			transform.rotation = Quaternion.RotateTowards(transform.rotation, rotationPoints[0].rotation, rotationSpeed * Time.deltaTime); 
		}
		else
		{
			animation.Play("Armature|Idle");
		}

		if(Input.GetKey(KeyCode.LeftArrow))
		{
			animation.Play("Armature|Walk");
			transform.rotation = Quaternion.RotateTowards(transform.rotation, rotationPoints[1].rotation, rotationSpeed * Time.deltaTime); 
			
		}
		else
		{
			animation.Play("Armature|Idle");
		}


	}
}

Hi @Haseeb_BSAA

I thought it’s should be like that

	if(Input.GetKey(KeyCode.RightArrow))
	{
		animation.Play("Armature|Walk");
		transform.rotation = Quaternion.RotateTowards(transform.rotation, rotationPoints[0].rotation, rotationSpeed * Time.deltaTime); 
	}
	else if(Input.GetKey(KeyCode.LeftArrow))
	{
		animation.Play("Armature|Walk");
		transform.rotation = Quaternion.RotateTowards(transform.rotation, rotationPoints[1].rotation, rotationSpeed * Time.deltaTime); 
	}
	else
	{
		animation.Play("Armature|Idle");
	}

your current code use right key then else condition, left key again else condtion.