GetGroupsAsync
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.
The IsInClan property in the returned table will always return false and exists for backwards compatibility. The Clans feature was sunset from the Roblox platform in 2016.
This function returns a list of tables containing information on all of the groups a given Player
is a member of.
The list returned will include an entry for every group the player is a member of. These entries are tables with the following fields.
Name | Description |
---|---|
Name |
The group’s name |
Id |
The group ID |
EmblemUrl |
An asset url linking to the group's thumbnail (for example: http://www.roblox.com/asset/?id=276165514) |
EmblemId |
The assetId of the emblem, the same which is used in the EmblemUrl |
Rank |
The rankId the player has (for example: 255 for the owner) |
Role |
The name of the player's grouprank (for example: Group Owner) |
IsPrimary |
A boolean indicating if this is the player's primary group |
IsInClan | A boolean indicating if the player is in this group's clan |
Note unlike GroupService/GetAlliesAsync
and GroupService/GetEnemiesAsync
, GetGroupsAsync returns a table rather than a StandardPages
object.
Parameters
Name | Type | Default | Description |
---|---|---|---|
|
The |
Returns
Return Type | Summary |
---|---|
An array of dictionaries containing information on the group’s the |
Code Samples
Getting the Groups that a User is A Member Of
This code sample will print information on all of the groups a player is a member of when they join the game, using GroupService/GetGroupsAsync
.