Swing Animation Script Not Working

Hoping someone can see what is wrong here I’m new to unity so its probably something very simple but I made an axe on blender and added a swing animation when I added it to unity it works when I have it on play automatically but I want to have it when the mouse is clicked it swings,
heres what I have

using UnityEngine;
using System.Collections;
public class swingaxe : MonoBehaviour {
// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (Input.GetMouseButtonDown (0))
{
animation.Play(“Cube|CubeAction”);
}
}
}

I’ve google’d about a bit to try and find something that works but no luck.

Try putting the script on the object that has the animation to see if it’s finding it. If it is, you probably aren’t finding the object properly.

Thanks much appreciated I’d spent aaages trying to work that out :wink: