API:Class/GroupService/GetGroupInfoAsync

GetGroupInfoAsync

YieldFunction of Players icon.pngGroupService
Variant GetGroupInfoAsync (
    int64 groupId
)
Parameters:
  1. groupId

Returns: Variant
Description: Returns a table containing information about the group

Notes

  • The Owner field will be nil if the group was abandoned
  • The table is structured as follows:
group = {
    Name = "Knights of the Seventh Sanctum",
    Id = 377251,
    Owner = {
        Name = "Vilicus",
        Id = 23415609
    },
    EmblemUrl = "http://www.roblox.com/asset/?id=60428602",
    Description = "We fight alongside the balance to make sure no one becomes to powerful",
    Roles = {
        [1] = {
            Name = "Apprentice",
            Rank = 1
        },
        [2] = {
            Name = "Warrior",
            Rank = 2
        },
        [3] = {
            Name = "Earth Walker",
            Rank = 255
        }
    }
}

Example

local groupId = 377251
local group = game:GetService("GroupService"):GetGroupInfoAsync(groupId)
 
print(group.Name .. " has the following roles:")
for _, role in ipairs(group.Roles) do
   print("Rank " .. role.Rank .. ": " .. role.Name)
end
Knights of the Seventh Sanctum has the following roles:
Rank 1: Apprentice
Rank 2: Warrior
Rank 255: Earth Walker

See Also