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

I want my script to tell if someone has reset?

Asked by 4 years ago

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?

1
I'm on phone but take a look at this: https://devforum.roblox.com/t/customizable-reset-button-logic/30463 Amiaa16 3227 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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:

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local deathScreenGui = -- index your GUI

humanoid.Died:Connect(function()
    deathScreenGui.Enabled = true
end)
Ad

Answer this question