#Clone error with the old regen button script

10 messages · Page 1 of 1 (latest)

edgy burrow
#

Well yes, I understand this isn’t my script, I found it off of the wiki fandom page here: https://www.roblox.fandom.com/wiki/Regens

I am using the code to test for a game I’m working on, however, for some reason, it creates multiple clones instead of one, please help me when y’all get the chance and thank you

edgy burrow
jagged rapidsBOT
#

studio** You are now Level 1! **studio

manic ingot
#

if Debounce == false then

#

Debounce = true

edgy burrow
manic ingot
#

No it s under the function

#
local Debounce = false
function regen()
   if Debounce == false then
        Debounce = true
         task.wait(4)
         Model = backup:Clone()
         Model.Parent = workspace
         Module:makeJoints()
         message.Parent = nil

         enable = false
         task.wait(10)
         enabled = false
         task.wait(1)
         Debounce = false
    end
end```like that
#

and u can do lua local work = workspace local PartToTouch = work.PartToTouch function onHit(hit) if hit.Parent:FindFirstChild(Humanoid) then regen() end end PartToTouch.Touched:Connect(onHit)