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

How do you make an team when in-game?

Asked by 10 years ago

I'de like to know, if you are in-game.. how you can create an new team.

Please say how I can do this. D:

1 answer

Log in to vote
0
Answered by
1N0body 206 Moderation Voter
10 years ago

With magic.

function checkForService()
    teams = game:FindFirstChild('Teams')
    if teams then
        return true
    else
        return false
    end
end
function createTeam(parent)
            local teamA = Instance.new('Team')
        teamA.Parent = parent
        teamA.Name ='' -- Name of the team
        teamA.TeamColor =BrickColor.new(255,255,255) --Color of the team in BrickColor
        -- make other properties if you want.
end

function makeAnewTeam()
print 'Abracadabra insert a new team' -- dont delete this
    if checkForService() == true then
createTeam(game.Workspace.Teams) 
    else
print 'Abracadabra insert a new team' -- dont delete this
        local findit = game:GetService('Teams')
        createTeam(findit)
    end
end
0
y complicate things ImageLabel 1541 — 10y
0
MAGIC! 1N0body 206 — 10y
Ad

Answer this question