make collider enabled when another object is destroyed

hey guys , how do i make a sphere collider enabled when another object tagged as “TNT” is destroyed , i have this variables but i dunno how to group them into a script , im quit noob at coding , can anyone help me please ? thanks ! (the sphere collider is in an empty object)

if (other.CompareTag(“TNT”)){
Destroy(other.gameObject);
collider.enabled = false;

We might need more code to understand exactly what you want and how you’re going about it but for starters:

collider.enabled = false;

should be

collider.enabled = true;

if it’s false then you’re disabling the collider

public class TNTScript:MonoBehaviour{
static List list = new List();
public bool exploding = false;
void Start(){
list.Add(this);
}
void Explosion(){
for (int i = 0; i < list.Count; i++){
float dist = (transform.position - list*.transform.position).sqrMagnitude;*
exploding = true;
if(dist < range && list*.exploding == false){*
list*.GetComponent().Explosion(gameObject);*
}
}
list.Remove(gameObject);
Destroy(gameObject);
}
}
Ok, so you need to try that as I cannot. The idea is that the list gathers all of the TNT boxes, you could do it in a way that you avoid static for the sake of time, I will do it this way.
The method iterates through the list and checks for any object that would be close enough. If so, it calls the Explosion on the other box.
To avoid TNT boxes to call it each other endlessly the exploding boolean is set and check.