for i, v in pairs(game.Players:GetChildren()) do v.Character.Humanoid.Died:connect(function() v.TeamColor = BrickColor.new("Institutional white") end) end
Why isn't this working? I want when a player dies, it take you to lobby.
game:GetService('Players').PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() game.Players:findFirstChild(character.Name).TeamColor = BrickColor.new("Institutional white") end) end) end)
this is simple... you just have to set the 'Auto Assignable' to false in the Spawn Part so that you can make a selectable spawn...