How do I play an animation from another object C#

Hello, so I have a method which has an object as parameter. Now the question is, I don’t seem to find a way to start the animation of that object.
this is what I have so far:

public void OpenMenu(GameObject menu){
	menu.GetComponent<Animation> ().Play ();
}

I don’t get errors but it states that it can’t find a default clip in attached animation list.
I hope you understand my problem and could help me, thanks in advance.

What spiceboy said in the comment, and also make sure you have a “default” animation set, or if you want to try playing it by name, use this syntax:

menu.GetComponent ().Play (“AnimationNameGoesHere”);