Play open animation on click

So I’m working on a class project (and we are allowed to seek help) and I have three chests in my level. I have started a C# script for them and I want it to check if the player (who is in FP)has clicked on the chest. If so I want it to play the open animation and I want a random object (sword/bow/potion/coin) to pop out.

I’m starting with the open animation. Here’s what I have so far (not much), but I keep getting an error saying that it is “required to access a non-static member”. I’ve tried the current way & “.CrossFade” and both give me the same error.

Please help…

Code:
void Update ()
{
if (Input.GetMouseButtonDown (0))
{
Animation.Play (“OpenAnime”);
}
}

P.S.
I’m using Unity 5

Edit
I forgot to mention, I was doing this in C#. But all I could find was scripts on how to do it in Java. I tried one and no errors, but no animation either! Here’s the new script:

#pragma strict

public var OpenAnime: AnimationClip;

function Start () 
{

}

function Update () 
{
	if (Input.GetMouseButton(0))
	{
		GetComponent.<Animator>().Play("OpenAnime");
	}
}

Am not used to java script, so the below code I wrote is for c#. Hope this helps.

using UnityEngine;
using System.Collections;

public class YOURSCRIPTNAME : MonoBehaviour 
    {
       public GameObject youranimatableObject;
       private Animator yourAnimator;
    
       void Start()
    	{	  
    	  yourAnimator = youranimatableObject.GetComponent<Animator>();
        }
    
        void Update()
    	{
    	  if(Input.GetMouseButton(0))
    	  {
    	    yourAnimator.animation.Play("OpenAnime");
    	  
    	  }
    	
    	}
    
    
    }

@Chellebell1689 Yeah where it says OpenAnime put in your animation I am not sure because I am very new to scripting but I will go ahead and test It out and tell you if it works or not