How to transform children of an object?

I’m trying to give all children of an object a random offset on the Y axis. However my code results in the object of itself to be transformed.

I add all children to a list and after this I loop through the list using the for each loop.!

The objects I want transformed are: HexaPillar.
The object that transforms is: Pillars
The script sits on Pillars

Line 26 is moving the parent. You need Offset_Pillars[n].transform.position