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

How to check if a player died?

Asked by 4 years ago
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:FindFirstChild("Humanoid")

while true do
    if humanoid.Health == 0 then
        print("So you have chosen, Death")
    end
end

This is my script. How can I check if a player died and this code is on starterplayer

0
We have Humanoid.Died event for that https://developer.roblox.com/api-reference/event/Humanoid/Died Block_manvn 395 — 4y
0
thx BabanizPROcuk 49 — 4y
0
Be sure to search for your question before asking next time. ScuffedAI 435 — 4y
0
took me about 1-2 days to fix the entire code .d BabanizPROcuk 49 — 4y

Answer this question