I need the script. I need this for my death screen system.
You can use Humanoid.Died for that (an event).
If it’s for something simple, I’d recommend using:
game:GetService('Players').PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Died:Connect(function() print(player.Name .. " has died!") end) end)
This is taken directly from the Roblox Devhub Humanoid | Roblox Creator Documentation
A very simple and effective method would be the: