Player Collide play animation

I am needing a code that when you step on my fake plank called PlankExplde it plays its animation called Take 001. The players name is Pirate. Any help would be loved thanks.

function OnTriggerEnter(other : Collider)
{
if(other.gameObject.tag == “Player”)
{
animation.Play(“Take 001”);
}
}

Put a trigger where the player has to be to activate the plank, and then make sure the player is tagged ‘Player’.