08-04-2011, 09:05 PM
Time regen:
[lua]
local object = script.Parent --PUT THE SCRIPT IN THE REGENERATING THING
local parental = object.Parent
local keepsafe = object:clone()
local waittime = 60 --Seconds between regens
--Beginning of code
sleep(waittime)
script.Parent = game.World
object:remove()
local safekeep = keepsafe:clone()
safekeep.Parent = game.World
script:remove()
--End of code.
[/lua]
Why is there no loop? Because it reclones the regeneration script each time it regens!
[lua]
local object = script.Parent --PUT THE SCRIPT IN THE REGENERATING THING
local parental = object.Parent
local keepsafe = object:clone()
local waittime = 60 --Seconds between regens
--Beginning of code
sleep(waittime)
script.Parent = game.World
object:remove()
local safekeep = keepsafe:clone()
safekeep.Parent = game.World
script:remove()
--End of code.
[/lua]
Why is there no loop? Because it reclones the regeneration script each time it regens!