Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do you make a Union consisting of 2 or more Parts with a script?

Asked by
esepek 103
4 years ago

Is it possible to make a Union consisting of 2 Parts with a script? If yes please answer! ;D

2 answers

Log in to vote
1
Answered by 4 years ago

(thanks to theking48989987 on the Dev Forum)

Example:

local part = game.Workspace.Part1
local otherParts = {game.Workspace.Part2, game.Workspace.Part3, game.Workspace.Part4}

local newUnion = part:UnionAsync(otherParts)
0
Thank you very much i didnt know UnionAsync was a thing. esepek 103 — 4y
0
make sure to accept the answer if it helped! :) matiss112233 258 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

You can use UnionAsync and SubtractAsync to create a unions at runtime between the initial part and a table of other parts.

0
Thank you very much i was searching for something like this! esepek 103 — 4y

Answer this question