First problem- Rigids (should really be rigids, but that's just convention) is a single Rigidbody, not an array [] of rigidbodies (which is what GetComponentsInChildren returns).
Second problem- you can't just change the values of every member in an array with
rigids.isKinematic
since the array itself does not have any member variables of that name! You have to use a for loop.
Third problem- your syntax for the for loop is all wrong. A for loop is constructed like so-
for (var temporaryName : Rigidbody in rigids)
{
// do things to temporaryName (which is the name of the current object)
temporaryName.isKinematic = false;
}
The last bit, after the 'in', tells it what array or list to search through in the for loop. So, instead of putting a reference to the rigidbody attached to the local gameObject ('rigidbody'), you should use your stored Rigidbody[] array.
Fourth problem- you are defining the array of all rigidbodies inside of Start. This means, that as soon as you get to the end of Start() they will be forgotten! You need to put them outside the scope of any function- that is to say, at the top of your script!
private var rigids : Rigidbody[];
function Start () {
rigids = GetComponentsInChildren(Rigidbody);
for(var body : Rigidbody in rigids)
{
body.isKinematic = true;
}
}
Then, in your OnCollisionEnter, do something similar to undo the 'kinematic' status of the rigidbodies.
Of course, as with all collisions, make sure that you have at least one non-kinematic rigidbody involved, otherwise the collision won't register. (I know, it sounds obvious, but we really do get a lot of questions about that one).
Here's a version in C#, which I can give more of a guarantee about (since it's a language I actually program in)
// this goes below all the using and monoBehaviour stuff- just use
// the automatically generated stuff, and change the name of it
// to whatever you need it to be called.
private Rigidbody[] rigids;
void Start()
{
rigids = GetComponentsInChildren<Rigidbody>();
foreach(Rigidbody body in rigids)
{
body.isKinematic = true;
}
}
void OnCollisionEnter(Collision collision)
{
if(some condition, depends on how your game works, really)
{
foreach(Rigidbody body in rigids)
{
body.isKinematic = false;
}
// at this point I would set some flag which says that the
// rigidbodies have already been activated- I might even
// delete this script instance with Destroy(this), depending
// on whether it has anything else left to do!
}
}