So here is the script:
game.Players.PlayerAdded:connect(function(player)
local folder = Instance.new("Folder",player)
folder.Name = "leaderstats"
local rank = Instance.new("IntValue",folder)
rank.Name = "School Rank"
rank.Value = player:GetRoleInGroup(1084573) -- put group id in parentheses
end)
Now, how can I make it where the custom gui knows the rank. And Here is another script that makes the text to know the username and the rank but how do I make it where it's a group rank?
while wait{} do
local player = game.Players.LocalPlayer
script.Parent.Text ="Rank".. player:GetRoleInGroup("leaderstats"):FindFirstChild("Rank").Value
end
And here is a photo I did to make a gui Group rank leaderboard:
https://gyazo.com/f323c744816862abe85148975cda5b8d https://gyazo.com/d375a6e43362fab0bb875cb1f7022fbd

1 comment
Thank you this works!