✓ Accepted answer
To use SubtractAsync(), the basic parameters are:
local ArrayOfPartsToSubtract = {}
local NewUnion = OriginalPart:SubtractAsync(ArrayOfPartsToSubtract)
Take note of these things:
The event takes a table as an input (the block(s) that will act as the NegativePart), so put any parts in a table.
If it is successful in creating a union, then it will not delete the blocks created to make the union, so you will have to delete those yourself. Also make sure to parent the union to the workspace.
There are two other parameters you can use (CollisionFidelity and RenderFidelity. Usually you won't use these parameters as the default settings work fine, but if you want to learn more about them, then the Roblox Creator Documentation explains them well.
I don't know what you exactly mean with "without using two separate parts". Making unions is impossible without a main part and a NegativePart. SubtractAsync() is basically a way to make unions in a script with a main part and different parts to subtract its volume with.
1 comment
Alright then, also, when you I mean in the sentence: "imagine it like slicing a piece of bread ingame without using two seperate parts." is that I don't want to create two seperate parts which are pretty much just identical to the bread and script it so the other half of the clone disappears or move slowly (or fast if I wanted that) to simulate it being the entire bread becoming cut