I Have This Regenaration Code For My Zomibes(Humanoid) And Towards The End Of The Code I Need It To Give The Person Who Slays The Zombie A Certain Amount Of Points(Leaderboard Values)
But I Just Cant Figure It Out!
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()
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
Anyone Have Any Solutions? Because I'm Kinda New To Lua.




2 comments
Why Must People Down Vote My Question And Not Even Atempt An Anwser? So Rude!
Well, you could of looked it up on google and the roblox wiki. There is even a search bar on the top of the page.