Collision detection not working

hi

i have a charachter in my scene that should collide with other GO in the scene. i attached my script to the character and added a Box Collider to it with the Is Trigger checked, i also added a Rigidbody component to the character, and for the GO i added a box collider to every one without checking the Is Trigger, this should work as i thaught but it didn’t, no collision is detected.

that’s my script

void OnTriggerEnter(Collider col){

        if (col.gameObject.tag == "aliment") {
       
            Destroy(col.gameObject);
            Debug.Log(col.gameObject.name);
        }

    }

It works fine on my end when I tested it, did you make sure the tag names were the same between what is in the script and what the gameObject has?

Remember to add tags to objects or it wont work…