Hello, I have been trying to add destruction physics to my game, so i created a tool that creates negative parts when hitting a part, and them unions them together, however, this is not working. There is the error message “Something went wrong. CSG returned error code -6. Please file a bug report, preferably with a file containing the problematic object(s).”
I also tried it with normal parts rather than negative parts, but it does nothing and there is no error message, how can i fix this?
local destroyPart = Instance.new("NegateOperation")
destroyPart.Anchored = true
destroyPart.Parent = game.Workspace
destroyPart.Position = script.Parent.Handle.Attachment.Position -- This is the position of the item used to destroy things
destroyPart.Transparency = 1
destroyPart.CanCollide = false
destroyPart.Size = Vector3.new(1,1,1)
part:UnionAsync({destroyPart})
@62bumperbrush
The “NegateOpertaion” part you created is an operation without any part information and that’s why CSG is failing. You can use SubtractAsyn instead of UnionAsyn, and subtract a part from another part.