How to disable component of the child object

I have game object Armor, which contain child object Smoke Trail and that contain component Ellipsoid Particle Emitter. And on Armor I have a script, from which I want to disable Ellipsoid Particle Emitter, but my code doesn’t works.

armor.GetComponentInChildren ("SmokeTrail").gameObject.SetActive(false);

You are using GetComponentInChildren Wrong…

You have to insert the component name not the GOs name

The Code would be:

GetComponentInChildren<EllipsoidParticleEmitter>().enabled = false;

If you want to disable the whole GO you should use transform.Find

transform.Find("Smoke Trail").gameObject.SetActive(false);

both scripts are untested