Is this script rightfor trigering animation?

Hi guys i have two objects. A balloon and a thorn.I want to make balloon burst when it touches thorn.I have made animation of balloon getting burst name “balpop”.I have attached rigid body and box collider to both thorn and balloon.Trigger is checked on thorn.And i have attached following script to balloon.

`#pragma strict

var balloonburst : AnimationClip;
     
  function OnTriggerEnter (thorn : Collider) 
    {
        if(thorn.tag == "thorn")
     {
       animation.Play("balpop");}

}

`

But its not working i do not know what am i doing wrong? please help me i have searched a lot but its not working.i am using java script.Thank you.

try

function OnTriggerEnter (thorn : Collider) {

if(thorn.gameObject.tag == "thorn"){
animation.Play("balpop");
}

}