Problem with trigger

Im having a problem with my ai and my sword attack. The problem is when I attack the enemy, the sphere collider from enemy are the one that trigger the event instead of the capsule collider. I used the sphere collider to detect who is inside the enemy range (like who enter and exit)…

My damage script are attached to my player sword game object the I use the OnTriggerEnter event. How can I make it to ignore the shpere collider? My sword is set to is trigger and same with the sphere collider

EDIT: sphere collider have radius of 15

Give the sphere collider that you wish the sword script to ignore a tag (e.g. ‘ignore’), then, create an if statement so that it makes sure that whatever you want to happen happens if it doesn’t have that tag.

Here is an example:

void OnTriggerEnter (Collider other) {
if (other.transform.tag != "ignore")  { //CHECKS THAT THE OBJECT THAT THE SWORD COLLIDED WITH IS NOT THAT PARTICULAR SPHERE COLLIDER
//HERE YOU CAN TELL IT TO DO WHAT YOU WANT IT TO
}