Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make a script so that after a certain period of time parts regenerate?

Asked by 6 years ago

How would I make a script that would regenerate parts which have a certain name in the workspace after a certain period of time?

Thank You and help is appreciated

0
clone it and after period of time destroy other one and put cloned one in marijus06 68 — 6y
0
how would I script that aspiringstar346 8 — 6y
0
workpace.Part:clone() idk aspiringstar346 8 — 6y
0
um would it be wait(60) then function createSand() workspace.Part.Clone() and then function destroySand() workspace.Part.Destroy() aspiringstar346 8 — 6y

3 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
local Clone = workspace.NAMEOFPARTORMODEL:Clone()
wait(SECONDS)
workspace.NAMEOFPARTORMODEL:Destroy()
Clone.Parent = workspace

you can put this in a while loop :)

Hope i Helped

0
so while true do loop aspiringstar346 8 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

You can do something like this. If you can script it should be easy to make this clone the item u want.

local regentimer = 1
local replicatedstorage = game:WaitForChild("ReplicatedStorage")

while wait(regentimer) do
print("Cloning")
local oldclone = game.Workspace:FindFirstChild("Part")
if oldclone ~= nil then
    game.Workspace.Part:Destroy()
end
wait(1)
local newclone = replicatedstorage.Part:Clone()
newclone.Parent = workspace

end

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Try using this script:

local model = --the name of the object you want to clone
local modelParent = --where you want to put the cloned object]
local seconds = --time in between cloning in seconds

while true do
    local modelClone = model:Clone()
    modelClone.Parent. modelParent
    wait(seconds)
    modelParent.model:Destroy()
end

Hope this helped!

0
How would I say to put the model I want to clone in the same position as it was before aspiringstar346 8 — 6y
0
it would do that VeryWowMuchDoge 47 — 6y
0
wouldn't it? I don't get why it wouldn't VeryWowMuchDoge 47 — 6y

Answer this question