In the output there always no error when the player die but it not changing team
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) char:WaitForChild("Humanoid").Died:Connect(function() plr.Team = game:GetService("Teams"):WaitForChild("Lobby") end) end) end)
Make sure the team is sure you already have a team that recommends you use :FindFirstChild() to be more direct.
plr.Team = game.Teams:FindFirstChild ("Lobby")