Animating jumps and rolls problem.

so i made a jump and duck game, and i have a constantly playing running animation (as i wanted) but i cant find a way to make the roll animation play on key down s and the jump on spacebar down, i have tried the following…

using UnityEngine;
using System.Collections;

public class WASDcontrols : MonoBehaviour {
	public float speed;
	public float Height;
	
	void Update () {
		Height = 0;
		if (Input.GetKey (KeyCode.S)) {
			transform.Translate (-Vector2.up * speed);
			Height = 1;
		}
	}
}

just to check if on s down the animation changes to animation by setting this in animator…

http://i.imgur.com/1KT3rSx.png (only using roll as a test because jump will be the same.
with a float of Height set to 0.0 and IF greater than 0.1 roll if LESS than 0.1 run, but nothing happens, im using Unity 5 2D. thank you for your help.

Instead of using greater than or less than how about triggers or boolean? For instance, you have a parameter in the transition to roll to be Active, and you want to roll if active is true therefore you set Active as false in the Animator and then

if (Input.GetKey (KeyCode.S)) {
    GO.GetComponent<Animator>().SetBool("Active",true);  //GO being game object
             transform.Translate (-Vector2.up * speed);