How to refer to the top child in a group

Is there anyway you can refer the the top child of a group? for example:

(in my case) I play around with the moving of objects to diferent groups, but if i want to assign certain propoties to the image last inserted, i find myself puting the exact number of images when refering to that child (lets say 5), but what if later on the user disides to add 1 more image to that group, that last child’s index will be 6 not 5, so it wont get the propoties i want it to take.

Is there anyway that when referring to the index i can put i dont know, this: group2:insert(group1[numChilderen]) , does writing numChilderen where the index is work for this?

**i tried group2:insert(group1[numChilderen]) but it doesn’t work** [import]uid: 123133 topic_id: 22974 reply_id: 322974[/import]

if you want to reference the last child in a group you can do so by writing group1[group1.numChildren]

your code above is missing the “group1” inside the brackets to prefix numChildren. [import]uid: 124706 topic_id: 22974 reply_id: 91769[/import]