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.
COMMUNITY QUESTION
Group Team Changer Scripting?
1 answer
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)
1 comment
0
H
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Use Player:GetRankInGroup() and see if its higher than the minimum required rank