GetComponentsInChildren<Rigidbody>() adds rigidbody to parent

I’m trying to make the rigidbodies in a group kinematic to move them around. This bit of code adds a Rigidbody to the parent no matter what on line 2. Is this expected? If so, what is a better solution?

        rigids = GetComponentsInChildren<Rigidbody>();
        for (int i = 0; i < rigids.Length; i++)
        {
                rigids[i].isKinematic = true;
        }

you can add a line to perform the above kinematic setting on only the children rigidbodies by ensuring the instance id of your children rigidbody is not equal to the parent’s instance id.

another method is to set your parent rigidbody to null, then modify the code to skip this null reference.