Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to check if a player has died?

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.

2 answers

✓ Accepted answer
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)

1 comment

0

Thanks :D

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...

This discussion is preserved as it was. New answers, comments, and votes are closed.