What are some reasons my gameObject isn't colliding?

I believe I have the code right–what are some reasons besides the code that it wouldn’t be checking for collisions? Both objects have a collider attached and the object in question has a rigidbody. What are some other reasons it wouldn’t be detecting collisions?

If ya’ really want to know, the code has an onCollisionEnter function that sets a Boolean to a value–it’s just not detecting and firing the function.

Hi !
If one gameobject has a collider (OBJ 1), and the other gameobject has both collider and rigidbody 2D (OBJ 2), you are starting right.

When you do play, OBJ 2 is stoping or crashing with OBJ 1?
if not, maybe one of the colliders is disabled, or maybe there aren’t really touching in any moment.
if yes. Maybe the OBJ 2 doesn’t have the script ?
Or you can have a typo, copy this:

void OnCollisionEnter (Collision col)
Debug.Log(“Hi !”);

I hope it helps, cheers !