OnCollisionEnter Problem

Hello Unity3D.i have a problem with my script.The Problem with my script is,My OnCollisionEnter won;t work the way i want it.For example,I have 5 animations i want my character to do on an opponent and i only does 1 out of the 5.Which is the first one…If anyone knows how i can make all 5 of the animations work.Can you please tell me how?

Heres the script

var player : GameObject;


  
    

function OnCollisionEnter(collision : Collision){
 
 if(collision.gameObject.tag == "Dummy"){
  if(player.animation.IsPlaying("Sweep_Kick"))

collision.transform.gameObject.animation.Play ("Stand_Air_Hit_back");

}
else
if(collision.gameObject.tag == "Dummy"){
 if(player.animation.IsPlaying("Violets_Bicycle_Kick"))
collision.transform.gameObject.animation.Play("Violets_Bicycle_Kick_Hit_Part_One");
}
else
if(collision.gameObject.tag == "Dummy"){
 if(player.animation.IsPlaying("Violets_Bicycle_Kick_Part_2"))
collision.transform.gameObject.animation.Play("Violets_Bicycle_Kick_Hit_Part_Two");
}
else
if(collision.gameObject.tag == "Dummy"){
 if(player.animation.IsPlaying("Lance_Kick_2"))
collision.transform.gameObject.animation.Play ("Air_Hit_Going_Up");
}
else
if(collision.gameObject.tag == "Dummy"){
 if(player.animation.IsPlaying("Falcon_Punch"))
collision.transform.gameObject.animation.Play ("Hit_Flying");


 
 	
 		
	}
 }

I think it’s a problem with the way you’re organizing the if statements.
Try this code instead:

function OnCollisionEnter(collision : Collision){
		
		if(collision.gameObject.tag == "Dummy"){
			if(player.animation.IsPlaying("Sweep_Kick")){
				collision.transform.gameObject.animation.Play ("Stand_Air_Hit_back");
			}
			else if(player.animation.IsPlaying("Violets_Bicycle_Kick")){
				collision.transform.gameObject.animation.Play("Violets_Bicycle_Kick_Hit_Part_One");
			}
			else if(player.animation.IsPlaying("Violets_Bicycle_Kick_Part_2")){
				collision.transform.gameObject.animation.Play("Violets_Bicycle_Kick_Hit_Part_Two");
			}
			else if(player.animation.IsPlaying("Lance_Kick_2")){
				collision.transform.gameObject.animation.Play ("Air_Hit_Going_Up");
			}
			else if(player.animation.IsPlaying("Falcon_Punch")){
				collision.transform.gameObject.animation.Play ("Hit_Flying");
			}
		}	
	}