How to tell the children of an object to scale

Hey there, I am pretty new to scripting and am confused by child / parent relationships …

I am trying to set all of the children of a game objects scale to 0 …
here is my script so far that I am dragging onto an object

using UnityEngine;
using System.Collections;

public class ParentChild : MonoBehaviour
{

Renderer[] listOfChildren;

void Start(){

	listOfChildren = GetComponentsInChildren<Renderer>();
	foreach(Renderer child in listOfChildren)
	{
		//child.enabled = false;
		child.transform.localScale = new Vector3(0, 0, 0);

	}

			}
}

If the issue is that all objects just disappear instead of only the children, then all you have to do is change the foreach loop to contain

if(child.gameobject != gameobject){ child.tranform.localScale = new Vector3(0, 0, 0); }

Strangely enough, getting the children also gets the parent object as well (there’s probably a good reason for this), which means that you’d also be setting the parent scale to 0 as well. So, all you have to do is filter out the parent object.