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

How do you make a function that ungroups an object, then deletes the parent?

Basically making the parent of the model's child and the model itself the same, and deleting the model but not its former child

1 answer

✓ Accepted answer
function ungroup(model)
	for _,v in pairs(model:GetChildren()) do
		v.Parent = model.Parent
	end
	model:Destroy()
end

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