Player Collision Groups Descendant Added

So I have a script where I connect descendantAdded of a player to a function that sets that descendant to the player’s collision group.

If there’s just one collision group that a player can be in, then I can write it to set it to that, but if there are more, then I have to write that collision group somewhere for each player, to then set it.

I’m thinking whether I should write it into a table somewhere, or maybe just check one of the the player’s parts’ collision group and set it to that?