A while back on this thread, I suggested there be a way to get all groups a user was in. It wasn’t on its own feature request thread, so I assume it just was forgotten about.
Say I have a game and I want the player to be able to wear their groups’ emblems (there are a lot of competition groups for front page games) on their shoulders or something. I can’t realistically check to see if they’re in every single group’s ID, so the only two other options are :GetGroupsAsync() and asking them to put which group they want to wear the emblem of in a textbox and then check if they’re in the group they say they are, but that textbox prompt is ugly and not very user-friendly. You have to make them tab out of the game, navigate to their group page, copy the group ID (because they’re typically not going to know it by heart), switch back into the game, and paste the ID into the textbox. It’d be a lot cleaner to automatically populate their inventory with the emblems of groups they’re in.
Imagine I have a front page game with custom private servers (so I can actually control them at a desirable level) and you’re able to restrict entry to your private server to just your own competition group. I can’t realistically check to see if they’re in every single competition group for this front page game, so the only feasible way to do that would be to go ahead and get all of the groups they’re a member of in one fell swoop so I don’t have to continually check if they’re in each and every competition group.
Let’s pretend I have “guild chat” (cross-server) for my front page game using HTTPService (not really feasible with DataStores). Again, similarly to the previous scenario, I can’t check to see if they’re in every single competition group (+ I don’t manage the groups so I wouldn’t want to have to upkeep a list of “guilds” for the game that could use guild chat – I would just want to automatically connect it for all of their groups), so I would need :GetGroups() to know which chats to plug them into (most people wouldn’t even bother inputting their groups into a textbox every time they joined the server since it’s be such a pain and my cross-server guild chat would go to waste)
Another example would be a war group database of sorts that kept track of the results of every battle at a group’s base. I would want to filter that immense number of results (groups get raided by a huge number of individual groups) down to just relevant results (the player would only care about how their group(s) did at the base), and the only way to know which groups to filter it down to is :GetGroupsAsync().
Say I have a universe game and in the start place I try to match people up who are in the same groups. As usual, I can’t check if they’re in every possible group in existence, so I’d need :GetGroupsAsync() and then pull from a previously set up DataStore list that stores currently playing members by group to match them with fellow group members.
<insert thank yous from TheGamer101, chaoticregandpledge, devChris, Lolocks, Wsly, and Semaphorism>
Semaphorism also suggested there be a way to get someone’s primary group, and that seems useful as well (when a group lets you choose a competition / war group to represent, default to primary group, monitor primary group for statistical purposes, provide bonuses the longer you have a group as your primary, etc)