Heres what ive tried:
local groups = GroupService:GetGroupsAsync(Player.UserId)
for _, groupInfo in pairs(groups) do
for key, value in pairs(groupInfo) do
if key == "Id" then
GroupId = value
elseif key == "IsPrimary" and value == true then
local group = game:GetService("GroupService"):GetGroupInfoAsync(GroupId)
print(group.Name)
end
end
end
The issue is it does get the primary group but it checks my primary group goes Oh its the commonwealth and then returns with tebrix interactive the group directly under my primary.
Screenshot of the console output
I have looked into Groups Api but im not too sure on how id implement that.