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

How do I make a working auto group rank team script?

Asked by 6 years ago

how do I make a team group rank script that if someone joins and that he is in this the group (2671856) any higher rank than 8 spawns in team called Officers and any lower ranks spawns in team Enlisted

and if player is not in group 2671856 he spawns in the team called Visitors

1 answer

Log in to vote
0
Answered by
farizarps 132
6 years ago
game.Players.PlayerAdded:connect(function(player) -- function is called when player joins game
    if player:GetRankInGroup(2671856) >= 8 then --checks if players rank in 2671856 is greater than or equal to 8
        player.Team = "Officers" -- sets players team to officers
    elseif player:GetRankInGroup(2671856) < 8 then -- checks if players rank in 2671856 is smaller than 8
        player.Team = "Unlisted" -- sets players team to unlisted
    else -- if player meets none of the above conditions 
        player.TeamColor = "Visitors" -- set team to visitors
end)
0
There can be issues with this script, for example. Sometimes the player will not spawn at the correct location Skippy_Development 59 — 4y
0
Sorry for the bump, but you can just reset the player CoolBlueJay000 48 — 3y
Ad

Answer this question