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

Group Team Changer Scripting?

Asked by 4 years ago

I am a dev in a SCPF and we need a new team changer, but I dont know the code where it only lets people with a specific rank in a group go on a team. Can anyone help me? I am pretty new to scripting.

0
Use Player:GetRankInGroup() and see if its higher than the minimum required rank theking48989987 2147 — 4y

1 answer

Log in to vote
0
Answered by
IDKBlox 349 Moderation Voter
4 years ago
local GroupId = 000000000

lcoal MinimalRank = 50
game.Players.PlayerAdded:Connect(function(Player)
    if Player:GetRankInGroup(GroupId) >= MinimalRank then
        -- Change players team
    else
        -- Don't change players team.
    end
end)
0
H Luchy_exe -5 — 4y
Ad

Answer this question