I’m curios how to get the name of a role by a group. I wanna make a team in my game for each role in a group. How would I do this? I’m only curious how to get the role name, nothing else.
3 Likes
You can do GroupService:GetGroupInfoAsync.
For more info, read: GroupService | Roblox Creator Documentation
3 Likes
Could you explain how exactly I would get the role name?
Wait, I think I know. When I do player:GetRoleInGroup, it gives me a string right?
local groupId = 377251
local group = game:GetService("GroupService"):GetGroupInfoAsync(groupId)
print(group.Name .. " here are the roles:")
for _, role in ipairs(group.Roles) do
print("Rank from group" .. role.Rank .. ": " .. role.Name)
end
So, it is basically
group.Roles