having trouble with my animation script

so i want it to play a animation when the player stands on the object

using UnityEngine;
using System.Collections;
public class spikeDestroy : MonoBehaviour {

public Animator anmin;

// Use this for initialization
void OnTriggerEnter2D(Collider2D col){

	if (col.tag == "Player") {
		Destroy (gameObject, 1);

		Animation.Play ("anim");



You need to use the anmin.Play(“anim”). Also I would add an event to the end of the animation that destroys the gameobject instead of relying on a timer that may need to change depending on the animation length.