animation help

ok i am making a connect 4 game and want to press c to start an animation that moves the bar thing at the bottom of the bored that releases the chips. can anyone help. this is what i got so far.

function Update(){

if(Input.GetButtonUp(“c”))
{
and have a script in here that starts the animation
}
}

Assuming you’ve got an animation for the bar opening, the code in the “if” statement could be as simple as:-

animation.Play();

If you’ve got more than one animation for the object, you will need to pass the name of the one you want to play as a parameter.