Playing Opposite Animation

Hey all I am trying to get the player to strafe when the player has pressed D or A, to check if the player is pressing D I am using the code if(Input.GetAxis("Horizontal") > 0). Which proceeds to turn my Model 90 degrees correctly but I need help with returning back to the starting point since I cant use the GetButtownUp because I am using GetAxis. So is there anyway to get my animation.Play("TurnBack"); to play when the player releases the D key? (GetButtonUp wont work because of my script).

Try Input.GetAxisRaw(). It will always return -1, 0, or 1 if it is controlled by keyboard.

if (Input.GetAxisRaw("Horizontal") == 0  !animation.IsPlaying("TurnBack")) {
  animation.Play("TurnBack");
}

Thanks for the help! Solved