Animation Problem

I’ve been working on a recoil script for my slingshot, the animation itself works fantastically but when I try to get my script to run it, it does not work. So here is my script attempting to get the animation to work.

// the name of the animation IS Recoil

function Start () {
if (Input.GetMouseButtonDown(0)) { 
animation.Play("Recoil");
}
}

All help will be appreciated.

the code must be put in the update function , so that the script can check every update frame for the input of the user .