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

How to link Rankd within Group to your Game? HELP

Asked by 9 years ago

I want to make a game with ranks, so When I JOIN A game it will automatically give me a rank.

Example: I am a Soldier in the Group, i joined the Game and im on the Soldier Team. I just got changed to Chairman in the Group, i rejoin, and now im Chairman.

^^ How do I make this Happen! ^^

PLEASE Answer

0
Unfortunately GetRankInGroup caches your rank meaning the server will remember it. So you would have to wait for a new server for a change to be recognized. M39a9am3R 3210 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

Do this:

local id = 0000 -- group id

game.Players.PlayerAdded:connect(function(p)
    if p:GetRankInGroup(id) == 255 then
        p.TeamColor = game.Teams.Chairman.TeamColor
    end
end)

GetRankInGroup returns the rank number of the player in the group. 0 is for a guest, and 255 is for the owner.

Ad

Answer this question