Melee Attack

I’m trying to make a melee attack so I put rigidbodies(iskinematic) to object and sword. I also added coliders but the problem is sword may touch the collider when the character moves a bit without waiting my hit command. What can i add to my code to wait for the animation to finish? Here is my code:

using UnityEngine;
using System.Collections;

public class Health : MonoBehaviour
{
    public float health;

    void Start()
    {
        health = 100;
    }

	void Update () 
    {
        if (health < 0)
        {
            Destroy(this.gameObject);
        }
	}

    void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Weapon")
        {
            health -= 10;
        }
    }

}

Ok. Find the answer.

First I added a gameObject called target

public GameObject target;

than set it’s value

target = GameObject.FindGameObjectWithTag("Player");

than checked animation status with

            if (target.animation.IsPlaying("attack01"))

Those 3 helped me to check animation and stop damages because of regular touches. I hope this helps you too.