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 auto assign in a team.?

For example , your in a game and there's 3 teams : Owner , Co-Owner and Member , So in the group there's 3 roles : Owner , Co-Owner and member , so when u join the game , It's going to check what rank u have in the group and auto assign the team for you.

1 answer

✓ Accepted answer
local groupid = 0

game.Players.PlayerAdded:Connect(function(Player)
    if Player:GetRankInGroup(groupid) == 255 then -- change 255 with your wanted rank !
       Player.Team = game.Teams.Example -- change Example to your team name!
    end
end)

-- e.g
game.Players.PlayerAdded:Connect(function(Player)
    if Player:GetRankInGroup(groupid) == 200 then
       Player.Team = game.Teams.Soldier
    end
end)

2 comments

0

Thanks, helped me a lot

0

You\re welcome

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