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
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
local Clone = workspace.NAMEOFPARTORMODEL:Clone()
wait(SECONDS)
workspace.NAMEOFPARTORMODEL:Destroy()
Clone.Parent = workspace
you can put this in a while loop :)
Hope i Helped
so while true do loop
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
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!
How would I say to put the model I want to clone in the same position as it was before
it would do that
wouldn't it? I don't get why it wouldn't
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
clone it and after period of time destroy other one and put cloned one in
how would I script that
workpace.Part:clone() idk
um would it be wait(60) then function createSand() workspace.Part.Clone() and then function destroySand() workspace.Part.Destroy()