Damage with OnMOuseDrag help

I’m having trouble with a script of mine. I have an object with two colliders that contains my BaseAnis script. Whenever I hold the left mouse button, it plays through the sequence of animation I layed out in the Animator window. I want to have the player click and hold on the colliders to damage the enemy as well. When the player has the enemy clicked, they will receive damage and play out their animation. I made UI for the objects healthbar, but it does not work. When I run it, and try using the OnMouseDrag(), it gives me an error in my AttackTrigger script saying that it failed to call the OnMouseDrag function. Any suggestions? I’m fairly new to scripting, help will be appreciated, Thank you.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BaseAnis : MonoBehaviour {
    public bool Stroke;
    private Animator anim;
        void Start () {
        }
        void Update () {
                anim = this.GetComponent<Animator> ();
        }   
        public void OnMouseDrag (){
                anim.SetBool ("Stroke", true);
        }
        void OnMouseUp (){
                anim.SetBool ("Stroke", false);
        }
    }
using System.Collections;
using System.Collections.Generic;
using UnityEngine.UI;
using UnityEngine;

public class Healthbar : MonoBehaviour {

    public Image currentHealthbar;
    public Text ratioText;
    private float hitPoint = 100;
    private float maxHitPoint = 100;

    // Use this for initialization
    private void Start () {

        UpdateHealthbar ();
       
    }
         
    private void UpdateHealthbar() {

        float ratio = hitPoint / maxHitPoint;
        currentHealthbar.rectTransform.localScale = new Vector3 (ratio, 1, 1);
        ratioText.text = (ratio * 100).ToString ("0") + '%';

    }
    private void TakeDamage(float damage) {       
        hitPoint -= damage;
        if (hitPoint < 0) {
            hitPoint = 0;
            UpdateHealthbar ();
        }
    }
    private void HealDamage(float heal) {
        hitPoint += heal;
        if (hitPoint > maxHitPoint) {
            hitPoint = maxHitPoint;
            UpdateHealthbar ();
    }
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AttackTrigger : MonoBehaviour {

    public bool isDamaging;
    public float damage = 10;

    public void OnMouseDrag (Collider col)
    {
        if (col.tag == "Player")
            col.SendMessage ((isDamaging) ? "TakeDamage" : "HealDamage", Time.deltaTime * damage);
       
                }
    }

A few things:

  1. You need not assign the animator in every update loop . Just assign it in Start or Awake and that is sufficient.
  2. You have a bool in your first script that is never used.
  3. I do not think OnMouseDrag works with a Collider as a parameter.