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?
