This is ment to detect when the player joins/respawns, and give them the proper clothing for their team.
local Players = Game:GetService("Players")
local Teams = Game:GetService("Teams")
local ServerStorage = Game:GetService("ServerStorage")
local RedTeam = Teams.Elves
local BlueTeam = Teams.Winters
local RedCharacter = ServerStorage.TeamCharacters.Elves.HumanoidDescription
local BlueCharacter = ServerStorage.TeamCharacters.Winters.HumanoidDescription
local function PlayerAdded(Player)
local function OnCharacterAdded(Character)
if Player.Team == RedTeam then
Player:LoadCharacterWithHumanoidDescription(RedCharacter)
elseif Player.Team == BlueTeam then
Player:LoadCharacterWithHumanoidDescription(BlueCharacter)
else
end
end
Player.CharacterAdded:Connect(OnCharacterAdded)
end
Players.PlayerAdded:Connect(PlayerAdded)
Instead, it would spawn in multiple copys of my character. I don’t know why this is happening!!