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

How do i make auto assign in a team.?

Asked by 4 years ago
Edited 4 years ago

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

Log in to vote
0
Answered by
imKlevi 94
4 years ago
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)
0
Thanks, helped me a lot Hi_ImNoob1 53 — 4y
0
You\re welcome imKlevi 94 — 4y
Ad

Answer this question