Hi, i have a character controller and a cube in my scene what i am trying to do is playing animation that was attached on the cube when the player collide with it
this is my script
function OnCollisionEnter(hit:Collision){
if(hit.gameObject,tag=="Player")
animation.Play("rotate");
}
this script is attached to the cube but when it collide nothing happen may someone tell me what's wrong?? thanks