Hey guys, I`m a little new to coding and I have been working on a animated character model “Paladin” in Unity 5. The thing is, I want him to switch animations when the model hits a physics collider. I made a code here in JavaScript but even when he hits the collider he wont play the new animation
`
#pragma strict
var Character : GameObject ;
function Start () {
}
function Update () {
}
function OnTriggerEnter (other : Collider) {
if(other.gameObject.tag ==“Paladin”){
GetComponent.().Play(“walking paladin”);
}
}
`