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

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