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

How to check if a player has died?

Asked by 10 years ago
while true do
    if game.Workspace.Values.Round.Value == "Begin" then
        game:GetService('Players').PlayerAdded:connect(function(player)
            player.CharacterAdded:connect(function(character)
                character:WaitForChild("Humanoid").Died:connect(function()
                    print(player.Name .. " has died!")
                    game.Workspace.Values.DeadGuns.Value = "Give"
                end)
            end)
        end)
    end
    wait(1)
end

I need it so If the value is == "Begin" then I want it to see if their dead, so that way when they die, I can make them repsawn with a gun I have set.

0
So what's the problem? It looks to me like you already know about the died event. Perci1 4988 — 10y
0
Is the CharacterAdded event what you're looking for? User#2263 0 — 10y
0
I know about the died event, but is this correct? When the round string is changed to begin, then it continously checks if some has died. And if someone does die during the time in which round value = begin then it sets of another value NinjoOnline 1146 — 10y

Answer this question