Is there a way to make child colliders not be classed as parent colliding?

I have 2 objects a character and a weapon. To fix various problems I have made the character a child of the weapon. The weapon has a rigidbody, so it can test for collisions. But the problem is the player is constantly bouncing along the floor until it hits a wall because it’s colliders seem to be classed as the weapons colliders as well. So, I was wondering, is there a way to make it so the character’s colliders are not classed as the parent’s colliders? PS, please don’t say remove it from the parent or remove the colliders from the character because when I remove the colliders the character falls through the ground and if I remove it from the parent it just screws up royally.

Remove it from the parent. Then use joints to achieve you desired behaviour. Or you could parent both rigidbodies to the same empty GameObject.

Seriously, having a rigidbody parented to another rigidbody will not work. You will have all sorts of strange, unpredictable behaviour. This is because a rigidbody considers all colliders in children as belonging to the rigidbody.