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

Is there a way to reposition objects without breaking welds?

Asked by 7 years ago

The title says it all. While I was working with a script to reposition a model with a weld, the parts disconnected from each other and broke off, as if the weld broke. Even when I'm not moving the parts at all, and just changing the parents of the parts also seems to break the weld connection.

The example below shows a model that contains two parts that are welded together using surface welds, and their parents are being changed twice which caused the weld to break.

local Model = game.Workspace:WaitForChild('Model') -- Has two welded parts inside the model
Model.Parent = game.ServerStorage
wait(1)
Model.Parent = game.Workspace -- Weld breaks here

I am currently working with humanoids, so anchoring the parts isn't an option (as far as I know, please correct me if I'm wrong).

As always, thank you for spending a minute or two by reading through my question and whether you answer or not, I'd be delighted to see some thoughts or comments on this question. :-)

1
set the C0 property, thats the offset. (Or C1, not sure.) RubenKan 3615 — 7y
0
Try Model:MakeJoints(). Meltdown81 309 — 7y

1 answer

Log in to vote
0
Answered by
Xiousa 156
7 years ago

You need to do Model:MakeJoints() as changing its parent will automatically call :BreakJoints()

Ad

Answer this question