I am making a death screen and i want it to be able to tell when they have reset or been killed by gunfire is there a way for my script to tell if they have reset?
For a death screen, surely you'd want it to appear for any cause of death, not merely resetting? In which case you can use humanoid.Died
:
1 | local player = game.Players.LocalPlayer |
2 | local character = player.Character or player.CharacterAdded:Wait() |
3 | local humanoid = character:WaitForChild( "Humanoid" ) |
4 | local deathScreenGui = -- index your GUI |
5 |
6 | humanoid.Died:Connect( function () |
7 | deathScreenGui.Enabled = true |
8 | end ) |