I want the collider to register the collision but not collide,Make Collider not collide but still register colliding

So, basically i have a gameobject parented to another gameobject that has a rigidbody. I have a script that checks for collision with the ground in the child object, and if it collides it sends a message to another script, and that works. However, i want the child object to not collide with the ground, but still register it and send a message to the other script. I did play with layers, but it ended up completely not registering the collision. What can i do?

Also, this is a 2D project.

Use triggers instead. If one of the colliders is a trigger, they won’t collide but will produce OnTriggerXXX messages instead of OnCollisionXXX methods. Note that triggers only detect overlap. They do not determine collision points since the physics system does essentially ignore them when it comes to collision detection / collision response.

So just make sure you have Is Trigger checked for your collider.