Problem with OnTriggerEnter

Hi , i have problem with OnTriggerEnter in my project i add two capsule in my project and i set capsule collider for them , i want to one of them move to other one position and when they collide each other both of them be destroyed , i use this code for destroy

    void OnTriggerEnter(Collider other)
    {
        Destroy(gameObject);
    }

but its not work ! i set isTrigger true
can any one help me thanks

First of all you have to add rigidboy on gameobjects.Because trigger actions are about physics.