I want to be able to play an animation when my fps object collides with a cube, how can i do this?
var door : GameObject; //Drag door to inspector view
var creak : AudioClip;//Drag sound clip to inspector view
function collider() {
door.animation.Play("Open");
door.audio.PlayOneShot(creak);
}
this is my JavaScript I have....