Odd Weld Constraint Behavior

I was unsure whether this thread should go in Building or Scripting, but my issue is the welds themselves, so i’ll put it here.


WeldContrainsts are being created when ever two parts are adjacent and have a “socket” that click.

The primary part is staying where it should, since it is anchored, however, the “Cube” part that the player can see, it’s getting offset by an insane amount.

I’m trying to avoid any legacy instances that may break with a single update.

1 Like

Consider looking into the older welding system, since they let you directly set the offset. Legacy Welds wont get removed because they are not deprecated

To quote the wiki directly

To place two parts next to each other, you’ll want to set the C0 to a blank CFrame with CFrame.new() and the C1 to the Part1’s ObjectSpace IN RELATION to Part0’s CFrame Part1.CFrame:toObjectSpace(Part0.CFrame)

Legacy welds break their joints if the offsets change. Moving the whole construction as one will not break the weld


Worked like a charm, thanks!
I don’t understand why a newer system dosen’t work as well as an older one.

Bumping thread because of the same issue, i decided to anchor everything when I weld it in the build area, but weird behaviour still presists when unanchored.
Parts show up with normals inversed on the server

EDIT: I checked and confirmed that the parts are being placed in the right position

EDIT 2: Code sample, C1 = p1.CFrame:toObjectSpace(p0.CFrame) didn’t work for me

local weld = Instance.new("ManualWeld", base.Welds)
local CJ = CFrame.new(m0.PrimaryPart.Position)
weld.C0 = m0.PrimaryPart.CFrame:inverse()*CJ
weld.C1 = m1.PrimaryPart.CFrame:inverse()*CJ 
weld.Part0 = m0.PrimaryPart
weld.Part1 = m1.PrimaryPart

Edit 3: Here’s what happens with weld constraints, but some odd velocity gets added

I’ve decided to create a new thread since now this issue is mostly script related.