How do I create a Regeneration Script for a Model? I would this function to execute after a Button with a ClickDetector has been Clicked.
Humanoid Regeneration Script:
local NPC = script.Parent
local NPC2 = NPC:Clone()
NPC.Humanoid.Died:connect(function()
script.Parent = workspace
wait(5)
NPC:Destroy()
wait(10)
NPC2:Clone().Parent = game.Workspace
script:Destroy()
end)

1 comment
create a while loop that adds 1 on to the npc's humanoid's health until it's health is it's maxhealth