Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

Im confused can someone help me

1 answer

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)

1 comment

0

It seems like you can only make like 26 different teams, im making an obby and need more teams than that

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