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 7 years ago
01function punishment()
02    while true do
03    if game.Players.LocalPlayer.Character.Humanoid.Health == 100 then
04    game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "THIS IS YOUR PUNISHMENT!", Enum.ChatColor.Blue)
05    wait(3)
06    game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "LIFE ISN'T AS SWEET AS YOU THOUGHT, HUH?", Enum.ChatColor.Blue)
07    wait(3)
08    game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "WHEN WILL YOU LEARN THAT YOUR ACTIONS HAVE CONSEQUENCES!", Enum.ChatColor.Blue)
09    wait(3)
10    else
11    break
12end
13end
14end

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 7 years ago

Use thee Died Event on humanoids.

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

Answer this question