When separating a union part, error code -6 is returned.

Problem

When trying to separate a part that is a UnionOperation class, I am getting the following error:

Something went wrong. CSG returned error code -6. Please file a bug report, preferably with a file containing the problematic object(s).

The problem is consistent and occurs all the time with a select set of parts. Not sure what is going on. This happens with all beta features turned off and all plugins disabled. Also, I have tried removing the textures and the issue still occurs.


Additional Information

Parameter Value
Problem Area Studio
Problem Component CSG Operations
First Noticed Just now: 7 Dec 2025
Priority Medium
Impact Medium
Annoyance Level High

The beta features that I have enabled are as follows:

None.

As for plugins, I have a bunch that are installed, but very few are enabled. The ones that are enabled are listed below with links to their details page on the Roblox store website:

None


Expectations

When I separate a union part, I expect to get the parts back.


Visuals


Reproduction

To reproduce the issue, perform the following steps:

  1. Load the attached file.
  2. Select the part.
  3. Try to separate it.
  4. Observe the results.

Files

CSG Bug.rbxl (66.6 KB)

Hey, thanks for reporting this. Do you remember how you created the union? The error here is indicating that the union is broken, so it would be helpful to figure out how it was created :slight_smile:

Yeah. It was created with two cylinder parts. (1, 63, 63) and then that was cloned (CTRL-D) and changed to (2, 14, 14) then negated. Then the two parts were unioned together. I want to point out that all the copies of that union are also having the same problem. Hopefully it can be corrected.

EDIT:

I have more information. It seems the problem has something to do with this script:

--[[ 

--[[ 
    Hex Union Placement (PivotTo version)

    Requirements:
      - workspace.Model : Model with geometry centered correctly.
        (PrimaryPart is NOT required when using PivotTo)

    Behavior:
      - Clones 6 models and arranges them in a regular hexagon
      - Center-to-center distance = 77 studs
      - Hexagon center = (0, 100, 0)
--]]

local TEMPLATE_NAME = "Model"
local template = workspace:FindFirstChild(TEMPLATE_NAME)

if not template or not template:IsA("Model") then
	error(("Template model %q not found in Workspace"):format(TEMPLATE_NAME))
end

-- Hex parameters
local center = Vector3.new(0, 100, 0)
local centerDistance = 77 -- distance between adjacent model centers
local radius = centerDistance

-- Container for results
local cluster = Instance.new("Model")
cluster.Name = "UnionCluster_Hex"
cluster.Parent = workspace

for i = 0, 5 do
	local angle = math.rad(i * 60)

	-- Hexagonal offset
	local pos = center + Vector3.new(
		math.cos(angle) * radius,
		0,
		math.sin(angle) * radius
	)

	-- Orientation: face TOWARD center
	local cf = CFrame.new(pos, center)

	-- Clone + position
	local clone = template:Clone()
	clone.Name = ("Union_%d"):format(i + 1)
	clone.Parent = cluster

	-- Modern positioning API
	clone:PivotTo(cf)
end

In the original “Model”, everything is fine. It seems the problem is the copies which are cloned from the original. They are the ones that are broken. After doing some testing, I think it has to do with the copy/paste between playtesting and edit mode because I can duplicate it on my end.

So new procedure:

  1. Playtest the file.
  2. Copy (CTRL-C) UnionCluster_Hex from game.Workspace
  3. Stop the playtest.
  4. Right-click on Workspace in Explorer and select Paste Into at Original Location.
  5. Try to separate the unions.
  6. Observe results.

Here’s a new file to work with which already has a script that duplicates the issue.

CSG Bug.rbxl (76.1 KB)

EDIT 2:

I did not create this script. The script was created with ChatCPT 5.1. The script is correct and does what it needs to do.

EDIT 3:

After some additional testing, it does NOT happen when doing Run mode, only when doing Test mode. Also, I have found that if the unions are copied from the workspace in the client view, the error happens, but not when copying them from the server view. So it’s something specific when copying unions from a running test using the client view that breaks them.

Hey, thanks so much for the detailed repo, we will look into this!

Hi @Maelstorm_1973, we use Test mode to simulate the final in-experience behavior, which is optimized for performance, so it doesn’t contain history data. As you noticed, you still can copy the object while in Run or Serve view and paste it back into Studio to continue editing. Hope it helps to explain the behavior you’re seeing.

Interesting. This brings up a few questions:

  • Based on your response, am I correct in assuming that this is not a bug then?
  • In the actual live server, can I also assume that the history is not attached to unions when they are downloaded to the client?
  • Is the history still attached to the union on the server in a live environment?

Exactly, so “Yes” to all 3 questions. It still allows for GeometryService APIs to work, but you won’t be able to copy from a Client or use Button operations (like Separate) since they require history.