Imported model is not responding to script

Hello everybody,

I made a model and imported it to Unity. In Unity, I animated the model.
Now, I want the animation to play when there is a collision with an object.

I’m testing it by dropping a cube down on the model. It does collide and bounce of the model, but it’s not responding to the script.

I simply used this JavaScript:

function OnCollisionEnter(){
  animation.Play("Animation");
}

Now comes the part I don’t understand:

In Unity, I made a cube and animated it. I applied the above script. Then I let something else collide with it. It does exactly what I want it to do: starting the animation on collision.

But when I apply the script to my imported model, there is no response to the script when something collides with it.

What am I doing wrong here? Did I do something wrong when importing the model? The model is a .3ds file.

Thanks.

I think you should change your animation name in your JavaScript where it goes:

animation.Play(“Animation”);

Is Animation your animation name? If it is, then go to the animated object in Hierarchy panel, then under inspector set its animation to your animation.