game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
c:WaitForChild('Humanoid').Died:Connect(function()
c.Team = game.Teams.Lobby
end)
end)
end)
✓ ANSWER ACCEPTED
What is wrong with this team script?
1 answer
✓ Accepted answer
The error is to replace c.Team with p.Team
as Team is part of Player, but not a part of the character
game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
c:WaitForChild('Humanoid').Died:Connect(function()
c.Team = game.Teams.Lobby
end)
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
