[SOLVED]Revive Player after amount of Secondos

Hello i want to make it so when ever the Player gets killed by a special weapon he dies and after 5 Seconds he gets revived (I have an Consolecommand named revive) I have an Idea how to make it but i don’t know how to run the revive Command after 5 Seconds. Here is the Idea =

hook.Add(“PlayerDeath”, “plyreviveafterdeath”, function()
local wep = LocalPlayer():GetActiveWeapon()
if ( IsValid( wep ) and wep:GetClass() == “test_weapon” ) then

From what you have described, here is what I did:

hook.Add("DoPlayerDeath", "Unique_Name", function(victim, attacker, damageInfo)
    timer.Simple(5, function()
        if victim:IsValid() then

(Server-side obviously)

After that you can add a condition before the timer to check the class of the weapon as you did before.

1 Like

Wow Yeah that was it thx for the quick Reply