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…
for i, v in pairs(model:GetChildren()) do
local union = partstable:UnionAsync(partstable)
union.Parent = workspace
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.
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)."
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.