How to raycast a child collider of a parent rigidbody

I am trying to Raycast to a child of my enemy GameObject. enemy has a rigidbody used for movement and no colliders. I want to shoot a bullet at the enemy via raycast but instead of hitting the parent hit the child objects ie his head. for some reason even using a layermask i cant hit the children only the parent.

No they dont as it screws up the movement. I did discover though that even though the hit information refers to the parent you can get the collider you hits transform which would be the child. So instead of hit.transform id use hit.collider.transform.

Do the children have rigid bodies? If they do not have rigid bodies, then the colliders in the children are all treated as if they are part of the parent.

This is a engine feature so that it is possible to make objects with irregular or concave geometry (Read the section labeled “Compound Colliders” halfway through):