trvlydre
(NOX trvlydre)
August 18, 2024, 11:19pm
#1
I want to make a team for each player when they join the game but it only creates one team for the first person to load in and then moves every new player to that team. This is the script
game.Players.PlayerAdded:Connect(function(player)
local playerTeam = Instance.new('Team')
playerTeam.AutoAssignable = false
playerTeam.Parent = game.Teams
playerTeam.Name = player.Name
player.Team = playerTeam
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
Players.PlayerAdded:Connect(function(player)
local playerTeam = Instance.new('Team')
playerTeam.AutoAssignable = false
playerTeam.Name = player.Name
playerTeam.Parent = Teams
player.Team = playerTeam
end)
trvlydre
(NOX trvlydre)
August 18, 2024, 11:32pm
#3
This resulted in the same issue
Farmboy014
(Farmboy014)
August 19, 2024, 12:26am
#4
Have you tried setting the team color ?
trvlydre
(NOX trvlydre)
August 19, 2024, 12:35am
#5
Idk how I didn’t think of this. Thank you bro
1 Like
system
(system)
Closed
September 2, 2024, 12:35am
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.