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

How Do I Add A Leaderstats Value To My Humanoid Regenaration Code? [closed]

Asked by 9 years ago

This Is My Regenaration Code For My Humanoid Zombies:

local Save = script.Parent:Clone()
Save.Parent = game.ServerStorage
local regenTime = 60
local messageTime = 2.5
local model = script.Parent
local message = Instance.new("Message")


function IsDead() -- checks if character is dead or not
    if model.Humanoid.Health <= 0 then
        return true
        else return false
    end

end



while true do
    if IsDead() then
        message.Parent = game.Workspace
        wait(1)
        message.Parent = nil 
        wait(1)
        -- respawn the dead character
        local GetBackup = Save:Clone()
        GetBackup.Parent = game.Workspace
        break -- braking the loop
    end
    wait(0)
end

model.Parent = nil -- cleaning the died zombie

And Here Is The Code Value I Want To Add To It:

points.Value = points.Value + 5

I'm New To Code So Could Some One Add The Value So It Give It When The Humanoid Zombie Dies?

Closed as Not Constructive by Unclear

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?