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

What is the script for making a team and setting your character to it?

Asked by 3 years ago

Im confused can someone help me

1 answer

Log in to vote
1
Answered by 3 years ago

Here's my script, this will create a team and place every new player in it, if you want to configure this some more, please go onto learning more things about assigning teams.

Since your question was more of a simple request for a script than for a request of help, I'm going to be your lucky answer and let you decide what you want to do with this.

Place this code into a script, and put the script into ServerScriptService.

local Players = game:GetService("Players")
local Teams = game:GetService("Teams")

local Team1 = Instance.new("Team",Teams)
Team1.TeamColor = BrickColor.new("Really red")

local function onPlayerAdded(self)
    if not self or not self:IsA("Player") then
        return
    end
    self.Team = Team1
end

for _,Player in pairs(Players:GetPlayers()) do
    onPlayerAdded(Player)
end
Players.PlayerAdded:Connect(onPlayerAdded)
0
It seems like you can only make like 26 different teams, im making an obby and need more teams than that superben654two 0 — 3y
Ad

Answer this question