Animation Script Help

I have this script which i think is meant to play a wave animation when p is pressed but it does not work could anyone help me with this?

    if(Input.GetKey("p")){
transform.Translate(transform.forward * Time.deltaTime);
animation.Play("Wave");
}

I’d guess there’s something wrong with your import settings, not the script itself. Try playing with the animation importer settings.