Getting the group role above a certain role

Hi, so lets say you have a rank in group called “Member” and you wanted to figure out the rank above it without having to go to the group and get the ID of the rank, any way to do this?

Figured it out someone told me about this service called GroupService (roblox.com).

local groups = game:GetService"GroupService"
local getGroupInfo = groups.GetGroupInfoAsync

local groupId = 1

local success, result = pcall(getGroupInfo, groups, 1)
if success then
	if result then
		--Query group's information here.
	end
else
	warn(result)
end
1 Like