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

How do I check if a local player dies?

Asked by 6 years ago

Hey noob to scripting here... Wondering if there's any way I can do an if statement when a player dies. Thanks!

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
local Player = game.Players.LocalPlayer

Player.Character.Humanoid.Died:connect(function()
    print(Player.Name .. 'Has died!')
end)
0
Considering you're new, it's best to learn Filtering Enabled. Don't waste your time trying to learn unfiltering enabled code. When it comes to the time you want to make a game for everyone to play you need to learn it. Kaosinfusedknight 36 — 6y
0
That did not work I'm trying to make a gui pop up when that happens and nothing happens. ExtremeNyanCat123 32 — 6y
0
well obv its in a server script... Kaosinfusedknight 36 — 6y
Ad

Answer this question