Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
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

Log in to vote
0
Answered by 6 years ago

Use thee Died Event on humanoids.

Humanoid.Died:Connect(function()
    print(“dead”)
end)
0
Where do I use it MustangHeart 67 — 6y
Ad

Answer this question