Scripting Unions

I just had a question if it is possible to union and negate via a script. Suppose I want a hole in the baseplate at some point and I want to negate a part and then make a union from it through a script, would it work? If it does, could you please explain how to do it?

https://developer.roblox.com/en-us/api-reference/function/BasePart/UnionAsync