FindChild/Change color

So I’m making a script to change the color of two parts of my player ( a 3 piece rocket ship). The body and front need to change color while the engine stays black. It needs to change the colors when it enters an object but I’m having problems calling the child and I’m not sure if they will change color.

public class Collection : MonoBehaviour
{
public Color White;
public Color Green;
public Color Red;

public Transform tForm;
public GameObject gObject;
private gObject.tForm.Find.("Body") = body;

void OnTriggerEnter(Collider other)
{
    //green
    if (other.gameObject.tag == "GreenCube")
    {
        other.gameObject.SetActive(false);
        //gObject.tForm.Find("Body");
        //Body.material.SetColor("_Color", Green);

    }
    //red
    if (other.gameObject.tag == "RedCube")
    {
        other.gameObject.SetActive(false);
    }
}

}

I’ve only started on the green, I’ll do the Red once the answer is given.

Well if the game object in this script is the body and the other parts are child objects you should be able to do something along the lines of this

private Color childColor;

public void ChangeColor()
{
childColor = new Color(1, 0, 0, 1) //red
gameobject.FindCompenentsInChildren<Material.Color>() = childColor;
}

I might be totally wrong on this but that’s my best guess. Good luck @Jacobsc