I have a script in C# and need to convert it to Javascript, and it involves arrays with rigidbodies.
//Rigidbody[] bodies=GetComponentsInChildren<Rigidbody>(); --> C#
var bodies : Rigidbody[];
bodies = GetComponentsInChildren<Rigidbody>();//Error
for(var rb : Rigidbody in bodies){
rb.isKinematic=newValue;
}
Any help would be appreciated.