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

How do I have a Text Label show a groups rank without manually doing it?

Asked by 5 years ago

I'm trying to make this XP system for a group and I have all the stuff down I just need to know where to start with making the Text label showing their rank so I don't have to manually do it for every member.

groupId = 2835927
game.Players.PlayerAdded:Connect(function(newPlayer)
   if newPlayer:IsInGroup(groupId) then                    
     local m = game.Players.LocalPlayer:GetRankInGroup(groupId)
RANKNAME = "Rank:" ..m
   end
end)

This is what I have done so far, and most tutorials I have looked at deal with leaderboards which is what I'm not looking for. I just need to get pointed in the right direction.

0
is this a local script User#23365 30 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

First off, you want to know if your script works (instead of game.Players.LocalPlayer:GetRankInGroup() , use newPlayer:GetRankInGroup()) We would add before end print(m)

(optional) Next, we want to name the roles

say, a normal member would be ranks 30 to 100. we would do...

groupId = 2835927

game.Players.PlayerAdded:Connect(function(newPlayer)
    if newPlayer:IsInGroup(groupId) then                    
        local m = newPlayer:GetRankInGroup(groupId)
        local RankNum = "Rank: "..m
        print(m)
        if m >= 30 and m <= 100 then
            local RankName = "Member"
        end
    end
end)

I hope this helps a little!

Ad

Answer this question