Hello, I need some help with Javascript coding. Basically I have a parent object that I have attached other objects to and made them children of it. They are all instanced objects that have code attached to them and I am trying to figure out how to use GetComponentsInChildren to find the script in all the children and run it for each of them but I guess i’m not understanding how to use GetComponentsInChildren in relation with scripts. If anyone can help me understand how to use GetComponentsInChildren to find scripts in children and then execute a function in all of those scripts it would be greatly appreciated.

var scripts = GetComponentsInChildren.();
for (script in scripts) {

var name = GetComponentsInChildren(hypRegistry);

    for (var nameSet : hypRegistry in name) 
    	nameSet.setTexture(shipNumber - 1);

Javascript version.