Version 1: Cloning (Duplication)
local model = script.Parent
local cframe = model.Primary.CFrame
local debris = game:GetService("Debris")
while true do
debris:AddItem(model, 5.001)
local backup = model:Clone()
wait(5)
backup.Parent = workspace
backup:SetPrimaryPartCFrame(cframe)
backup:MakeJoints()
end
Using the Debris Service, we can remove the model after the clone is made.
Since we want it to appear where the first model was, we save the CFrame of the Model's PrimaryPart (make sure you have chosen one), then use :SetPrimaryPartCFrame() to move the model to that location.
Version 2: Model Movement (Specific Case)
Assuming your model would not be destroyed / altered in anyway, you can simply use the :SetPrimaryPartCFrame() to reset the model's position.
local model = script.Parent
local cframe = model.Primary.CFrame
while true do
wait(5)
model:SetPrimaryPartCFrame(cframe)
end
2 comments
If script.Parent is the model and you are using Destroy on the model. The script will also be removed.
Oh okay. I just tried moving the script into workspace and changing the top line to match my model's name. It works now.