Hello Unity Community,
I am using this trigger here:
var blockMove : AnimationClip;
function OnTriggerEnter (player : Collider) {
if(player.tag=="Player")
animation.Play("blockmove");
}
What I’m attempting is a trigger that when entered will play an animation moving blocks around. I have it set up that the Block is a child of the triggerbox. the animation works fine on it’s own, but nothing happens when I enter the box. I’m not sure what I’m doing wrong. If any of you guys have any tips please let me know!
Thanks.
why not use the Activate Trigger.js that comes with unity. it is accurate with more options and easy to use!!
instead of animation.Play(“blockmove”); why don’t you do animation.Play(blockMove) – from what I see you already have the variable created 
Check for spelling mistakes & grammar (upper & lower case).
var blockMove : AnimationClip; // Name of the animation
var blockObject : GameObject; // name of the game object you want to animate
function OnTriggerEnter(){
animation.Play ("blockMove");
}
Can’t stress enough about double checking spelling & grammar. I’ve been stumped plenty of times and usually because of upper and lower cases.