Is there any way I can get from in-game a ranks or roles description within a group?
It would be really beneficial, as I could use it to store values, such as what color I would want the rank to be displayed as in games.
reading this should help
https://developer.roblox.com/en-us/api-reference/function/Player/GetRankInGroup
oh, and this can also be helpful: Player:GetRoleInGroup
Both of these only return the Rank ID or the Role Name, I need the description.
oh sorry i didn’t read it correctly, i think you can’t get the description
local groups = game:GetService("GroupService")
local function getGroupInfo(groupId)
local success, result = pcall(function()
return groups:GetGroupInfoAsync(groupId)
end)
if success then
if result then
return result
end
else
warn(result)
end
end
local groupInfo = getGroupInfo(1) --First group ID.
print(groupInfo.Name) --RobloHunks
print(groupInfo.Id) --1
local groupOwner = groupInfo.Owner
if groupOwner then
print(groupOwner.Name) --RobloTim
print(groupOwner.Id) --1179762
end
print(groupInfo.EmblemUrl) --Group's icon.
print(groupInfo.Description) --Group's description (currently empty).
for _, groupRole in ipairs(groupInfo.Roles) do --Iterate over the group's roles.
print(groupRole.Name) --Group role's name.
print(groupRole.Rank) --Group role's rank.
end
https://developer.roblox.com/en-us/api-reference/function/GroupService/GetGroupInfoAsync
Unfortunately I have not come across a way to do this, but I do look for this kind information that is delegated to roles itself; I use it in my own games. I use a proxy that I own (for free) on Heroku, and I use it to do https requests to the Roblox api. Would you be interested in using the HttpService to send requests to a proxy of your own? There are a few tutorials I can give you if you’d like!
Edit:
If you’ve heard about heroku and its credit card needs, it’s not that way for how I use it. My proxy is always up anytime I need it
The description of a role cannot be read unless the authenticated user can see the admin panel.
Since there is no authenticated user on Roblox Servers, this wouldn’t be possible without
a. An auth token of someone who can see the roles tab in the admin panel
b. A proxy for the Group API
Descriptions seem to serve the purpose of describing what the role is for, for admins, but not regular users.