I have made a health kit script and I inserted it into a part for the player to heal but the problem is how can I make it respawn every 20 or 30 seconds after the player touches it to heal? please help.
function onTouched(part)
local h = part.Parent:findFirstChild("Humanoid") -- It finds Humanoids in whoever touched this
if (h ~=nil) then -- If there is a Humanoid then
h.Health = h.MaxHealth -- Sets the health to maximum (full healing)
end
end
script.Parent.Touched:connect(onTouched)
Note: This is a script not a local script

3 comments
You can try it out :Clone() !
Can you give me an answer instead? I never tried that property before
Use ":Clone()" and a "for i,v in pairs" loop, just define I how many seconds or do a wait('seconds here')