[CSG] Removing a union and re-adding the same union loses data

Not the best explained, but it is something that may be unfixable, and has a work around… This is for Regen buttons mostly.

Repro steps:

  1. Make a regen button similar to this basic one:
local DB = false
local Model = script.Parent.Model:clone()

script.Parent.RegenButton.Touched:connect(function(Part)
	if game.Players:GetPlayerFromCharacter(Part.Parent) then
		if DB == false then
			DB = true
			script.Parent.RegenButton.BrickColor = BrickColor.new("Black")
                        OldModel:remove()
			local NewModel = Plane:clone()
			NewModel.Parent = script.Parent
			wait(45)
			DB = false
		end
	end
end)
  1. Run it
  2. All CSG unions will not render

The temporary fix is to store the model in something like ReplicatedStorage.