[HELP!] - How do I make this group of parts one single part?

Greetings, I need help with creating an independent part made out of thousands of parts while the game is running. I’ve tried to make a union, but when there is a lot of parts, I get an error in the output:

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

I also tried to substract the whole model from a big part and then substract this bigpart with another big part. But I get the same Error message…

Script

The Code:

    for i, v in pairs(model:GetChildren()) do
		table.insert(partstable,v)
	end

	local union = partstable[1]:UnionAsync(partstable)
	union.Parent = workspace

If you know any of executing this, reply

1 Like

Based on the error message you received, it seems like the issue is related to the CSG (Constructive Solid Geometry) system in Roblox Studio, which is used to create unions, differences, and intersections between parts. The error code -14 indicates a CSG failure, which could be caused by a variety of reasons such as overlapping geometry, non-manifold geometry, or too many parts being used.

To create an independent part made out of thousands of parts while the game is running, you could try using the WeldConstraint instead of a union. The WeldConstraint will allow you to connect multiple parts together while maintaining their individual properties such as mass, friction, and collisions.

You can use as an alternative: WeldConstrait

1 Like

I’m looking for a way for simplifying and optimizing the model. I also want to detect when a player is stepping on the model and when it stops stepping on it.

2 Likes

the CSG tends to have low performances so what i suggest is doing it in cycle, and not everything at once. it would take a bit more time but at least it wouldn’t crash.

for example :

i have 1000 part
union 100 part x 10
union the 10 resulting part

1 Like

Ok I’ve tried this, but it doesn’t work, the unions can’t be joined.
Error: " Something went wrong. CSG returned error code -6. Please file a bug report, preferably with a file containing the problematic object(s)."

1 Like

i’ll try to look more into it but i can’t guarantee anything

1 Like

Thanks for deeping into this issue

1 Like

you could make it into a mesh if that works

select all the parts, right click it in the explorer and click export selection

after that open assett manager in the view tab, insert the mesh and select import as single mesh

1 Like

A script must do that, I want to fuse the parts in-game.

1 Like

Is there any way to execute this by making this group of parts one single mesh in roblox studio with script?

1 Like

What if you deleted the model and replaced it with a mesh of the parts. Can that work?

1 Like

How do I replace it with the mesh of the parts?

1 Like

Like, create the mesh, then put it somewhere you can pick it up later, and once done delete the model containing the part and parent the mesh to the workspace

1 Like

What do you mean with create a mesh?

1 Like

What that guy said:

I recommend duplicating the model i case it deletes the model and replaces it with a mesh

1 Like

It has to be in-game and with script

1 Like

What I mean is that you could delete the model and replace it with a mesh with a script. But to do the mesh you first have to create it in studio.

1 Like

Ok, I now see what you mean. But, have you already tried this in-game in Roblox Studio? Does it work?

1 Like

Try breaking it down, combine each n (ex. 10) parts into a union, then recursively call the function that combined them so that it combines another n parts (randomly) and when there’s less than n, make it combine all the parts there, should theoretically work.

1 Like

I’ve tried that already, It doesnt work.

1 Like