How do i make negative union sphere with scripts?

The title is straightforward. How do i make negative union sphere with scripts?

Super sorry I don’t have more time to look into this but SubstituteGeometry() might be worth a look?

1 Like

If straight up having the negative union sphere isn’t the goal, you can just pass a part with the ball shape into Instance:SubtractAsync() and it’ll do the job.

I did and i got error
Unable to cast value to Objects

I’m doing something different, because it works for me.

-- First sphere
local Sphere = Instance.new("Part")

Sphere.Shape = Enum.PartType.Ball
Sphere.Size = Vector3.new(4, 4, 4)
Sphere.Anchored = true
Sphere.Position = Vector3.new(0, 10, 0)

Sphere.Parent = workspace

-- Second sphere
local Sphere2 = Instance.new("Part")

Sphere2.Shape = Enum.PartType.Ball
Sphere2.Size = Vector3.new(4, 4, 4)
Sphere2.Anchored = true
Sphere2.Position = Vector3.new(0, 12, 0)

Sphere2.Parent = workspace

-- Union
local Union = Sphere:SubtractAsync({Sphere2})

Union.Parent = workspace

Fixed it. I don’t know what i did but i fixed it.

SubstractAsync did work tho!

character