PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

Humanoid.Died

Humanoid.Died

Oct 01 2018, 1:57 AM PST

The code below would print the player’s name, followed by “has died!”, whenever a player dies. For example, if the player was named “Shedletsky”, “Shedletsky has died!” would be printed to the output when they died.

game:GetService('Players').PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		character:WaitForChild("Humanoid").Died:Connect(function()
			print(player.Name .. " has died!")
		end)
	end)
end)