Making a game where you have to blow stuff up and the parts are not anchored. So how do you make it so the model doesn't fall apart upon re spawn?

Cheers

local regenTime = 180 -- 3 minutes
local messageTime = 2
 
local model = script.Parent
local message = Instance.new("Message")
 
--Check that the script hasn't been placed in workspace
if model ~= workspace then 
	message.Text = "Regenerating Massive Noob This May Cause Lag"
 
	local backup = model:clone() -- Make the backup 
 
	while true do 
		wait(regenTime) 
 
		--Remove the model
		model:Destroy()
 
		--Show the message
		message.Parent = game.Workspace 
		wait(messageTime)
		message.Parent = nil
 
		--Copy the backup
		model = backup:clone() 
		model.Parent = game.Workspace 
		model:makeJoints()
	end
else
	error("Script not put in a model! Nothing to regenerate!")
end

3 comments

0

I would expect MakeJoints() to work. If the model is fine before the regeneration, consider moving it (ex up 1 stud) so that it isn't in contact with anything else when the script performs "model:Clone()"?

0

that doesn't work! :(f