How could I know if a player died and use it in an if statement. In my game, every time a player dies, a point will be given to the other team. Is there a way to do this? Thank you for trying to help.
✓ ANSWER ACCEPTED
Is there a way to detect if player died?
1 answer
✓ Accepted answer
You can use the .Died RBXScriptSignal of Humanoid to create an event upon the affiliated Player “dying”.
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
Humanoid.Died:Connect(function()
print(Player.Name.. " Died"
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thank you. :)