Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer
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)

2 comments

0

There can be issues with this script, for example. Sometimes the player will not spawn at the correct location

0

Sorry for the bump, but you can just reset the player

This discussion is preserved as it was. New answers, comments, and votes are closed.