Seperating a union via Script

Quick question, how do i seperate unions via a “Script”?

I’ve been circling through other topics but i can’t seem to find a proper result.

Already existing post about this topic

The problem with this is that once a union is separated, the parts will not fully revert to their original state.

That’s exactly what im going for.

I’ve seen this post, yet i can barely understand. (I am a beginner Developer.)

Any ideas how it works?

Sadly there is no way to revert a union to it’s original state using a Script, your best shot would be Cloning the parts and storing them in ReplicatedStorage and instead of Seperating the created union just clone the one from ReplicatedStorage (The parts you cloned before making the Union) and just position it where the old Union was using :GetPivot() and :SetPivot()

If you need any help in doing something like this feel free to ask me

I’m pretty sure I’ve posted this for you in a different thread.

Nope it was someone else… they never got back to me if any of this worked for them…

That’s exactly what im pretty much doing. I want it to seperate and not do anything else.

This is for saving unions inside a datastore. This isn’t my current problem.

you can do this to separate a union using a plugin, other than that theres no way to separate a union without knowing what parts it was made of

-- this could error
local success, parts = pcall(function()
	return plugin:Separate({union})
end)

i managed to almost get a system of separating them by saving the offset from the center position of the union then color, material, size, all of that and storing it in a table that can be used to reconstruct the union later. but it was unreliable and really liked to break

1 Like

What plugin does it use? (Sorry i don’t understand)

I don’t want to reconstruct the union, I’m aiming for only seperating it.

im saying put that code into your own plugin and it will separate it

there is no way to separate unions at runtime its just impossible. the only way you could “separate” unions is by knowing the parts that union was made of stored in like a dictionary and you can create each part then delete the union, that would “separate” it