hi guys, i need help

I’m trying to create a AI for my 3d game, however after my AI dead i want it to disappear but i don’t know how to do it. I’m using Destroy method but i don’t know why it not disappear at all, so plz help
this is my code that I got so far

using System.Collections;
using UnityEngine;
using UnityEngine.UI;

public class detectHit : MonoBehaviour {
	public Slider healthbar;
	Animator anim;

	void OnTriggerEnter(Collider other)
	{
		healthbar.value -= 20;
		if (healthbar.value <= 0)
			anim.SetBool ("isDead", true);
    }

	// Use this for initialization
	void Start () {
		anim = GetComponent<Animator> ();
	}
	
	// Update is called once per frame
	void Update () {
        if ("isDead" = true)
        {
            Destroy(gameObject, 5);
        }
    }
}

i added a line so you can see if you are getting your trigger in the console. this should work

using System.Collections;
using UnityEngine;
using UnityEngine.UI;

public class detectHit : MonoBehaviour {
	public Slider healthbar;
	Animator anim;
	bool isdead;
	
	void OnTriggerEnter(Collider other)
	{healthbar.value -= 20;
		print ("health is " + healthbar.value);
		if (healthbar.value <= 0) {
			anim.SetBool ("isDead", true);
			if(!isdead){isdead=true;
				Destroy(gameObject, 5);}
		}}

	void Start () {
		anim = GetComponent<Animator> ();
	}

}