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

How do I stop the text from popping up after I die?

function punishment()
	while true do
	if game.Players.LocalPlayer.Character.Humanoid.Health == 100 then
	game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "THIS IS YOUR PUNISHMENT!", Enum.ChatColor.Blue)
	wait(3)
	game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "LIFE ISN'T AS SWEET AS YOU THOUGHT, HUH?", Enum.ChatColor.Blue)
	wait(3)
	game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "WHEN WILL YOU LEARN THAT YOUR ACTIONS HAVE CONSEQUENCES!", Enum.ChatColor.Blue)
	wait(3)
	else
	break
end
end
end

Yeah I try to get it to stop but it keeps going. What do I do so when I die it stops?

1 answer

✓ Accepted answer

Use thee Died Event on humanoids.

Humanoid.Died:Connect(function()
    print(“dead”)
end)

1 comment

0

Where do I use it

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