Turning off Meshrenderer for children from Raycast

I am shooting out a RaycastHit array.

I am trying to turn off anything with a Meshrenderer that is hit. Some of my objects have Empty Game objects with colliders on them and then a mess of smaller mesh objects parented to that empty object.

The different code snippets I have tried are below. Any help would be appreciated.

// Attempt 1  returns code errors.
	test = GetComponentInChildren<MeshRenderer> ();
	foreach (MeshRenderer test2 in test)
			test2.enabled = false;

// Attempt 2  - no code errors, but error when meshfilter not found on object.
	if (hit.collider.gameObject.GetComponent<MeshFilter>().mesh = null) {	 
                  return;
	}

// Attempt 3  - returns code errors
	hit.collider.gameObject.GetComponent<MeshRenderer>().enabled = false;
	hit.collider.gameObject.GetComponentsInChildren<MeshRenderer> ().enabled = false;

for( int hitIndex = 0 ; hitIndex < array.length ; ++hitIndex )
{
RaycastHit hit = array[hitIndex] ;
MeshRenderer childrenRenderers = hit.collider.gameObject.GetComponentsInChildren ();
for( int rendererIndex ; rendererIndex < childrenRenderers.Length ; ++rendererIndex )
childrenRenderers[rendererIndex].enabled = false ;
}

I think I may have gotten it. Posting here for others to use.

Renderer[] rs = hit.collider.GetComponentsInChildren (); foreach(Renderer r in rs) r.enabled = false;