New: Nitro Boost our Discord server and receive full donation perks here on the website! Join the Scripting Helpers Discord Server to learn more! You can also Support on Patreon as always.
Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

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

Asked by
esepek 5
11 days 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
0
Answered by 11 days 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 5 — 11d
0
make sure to accept the answer if it helped! :) matiss112233 205 — 11d
Ad
Log in to vote
0
Answered by 11 days 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 5 — 11d

Answer this question