Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How can I make a Group Rank Gui Leaderboard?

Asked by
dog6779 25
6 years ago
Edited 6 years ago

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 answer

Log in to vote
1
Answered by 6 years ago
Edited 6 years ago

On line 3 in the second script you tried using GetRoleInGroup to find the directory of the value

It should just be:

script.Parent.Text = "Rank"..player("leaderstats"):FindFirstChild("Rank").Value
0
Thank you this works! dog6779 25 — 6y
Ad

Answer this question