Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I respawn models while still keeping the original model existing?

I'm sorry if this is a stupid question, (i'm very new to coding) but is there any way to keep an original model from getting deleted because the new model has to spawn?

Here's the code:

"model = game.Workspace.Cars.RedCar1 backup = model:clone() -- backs up the model so it can respawn

while true do wait(7) -- regenerates the model after 7 seconds model:remove() model = backup:clone() -- loads the backup of the model model.Parent = game.Workspace.Cars model:MakeJoints()()

end"

2 comments

0

very hard to understand what you mean and the code is hard to read, you can use the blue circle button to format code. it seems like your doing model:Remove() which is destroying the model then your creating a new one replacing it, im not sure what you are trying to do

0

can you be more specific? what game are you trying to do and what do you want to accomplish

1 answer

model = game.Workspace.Cars.RedCar1 
backup = model:clone() -- backs up the model so it can respawn
while true do 
wait(7) -- regenerates the model after 7 seconds 
model:destroy() 
model = backup:clone() -- loads the backup of the model 
backup = model:clone() -- backs up the model so it can respawn
model.Parent = game.Workspace.Cars 
model:MakeJoints()
end

This discussion is preserved as it was. New answers, comments, and votes are closed.