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 10 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 10 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
10 years ago
group = 000000 --Modify this to group ID.
game.Players.PlayerAdded:connect(function(np)
local ls = Instance.new("StringValue")
ls.Parent = np
ls.Name = "leaderstats"
local r = Instance.new("StringValue")
r.Parent = ls
r.Value = np:GetRoleInGroup(group)
r.Name = "Rank"
end)

Answer this question