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

How can I get group ranks in the Leaderboard?

Asked by 11 years ago

I have seen a few groups with places that did this and I took a few models from free models, but they have not worked.

2 answers

Log in to vote
2
Answered by 11 years ago

Hello!

Here's an Solution for you!

game.Players.PlayerAdded:connect(function(P) repeat wait() until P:findFirstChild("leaderstats") local Rank = Instance.new("StringValue", P.leaderstats) Rank.Name = "Group Name" Rank.Value = P:GetRoleInGroup(Group ID) end)

So Example is....

game.Players.PlayerAdded:connect(function(P) repeat wait() until P:findFirstChild("leaderstats") local Rank = Instance.new("StringValue", P.leaderstats) Rank.Name = "Hayward Fire Dept." Rank.Value = P:GetRoleInGroup(740908)
end)

Dont Forget to Add an Point

If you have anymore Questions Message Masterspartin191 On Roblox!

Ad
Log in to vote
1
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
11 years ago
01group = 000000 --Modify this to group ID.
02game.Players.PlayerAdded:connect(function(np)
03local ls = Instance.new("StringValue")
04ls.Parent = np
05ls.Name = "leaderstats"
06local r = Instance.new("StringValue")
07r.Parent = ls
08r.Value = np:GetRoleInGroup(group)
09r.Name = "Rank"
10end)

Answer this question