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

Team atuo assign with group id?

Asked by 4 years ago

Ye so i'm making a game which i want when users join they get the rank that the group id is attached to but idk how to start please help?

1 answer

Log in to vote
0
Answered by
VitroxVox 884 Moderation Voter
4 years ago

Hello, I've made this for another guy today i think so, here you go:

local groups = {
[0000] = "TeamNameHere",    -- insted of the 0000 add ur groups id
[2951985] = "Team2"
}

game.Players.PlayerAdded:Connect(function(player)
    for ids,team in pairs(groups) do
        if player:IsInGroup(ids) then
            player.Team = game.Teams[team]
        end
    end
end)

if it worked please accept, thank you.

0
Yes it worked thank you AiZhAnA_FaN1 2 — 4y
Ad

Answer this question