WeldConstraints positioning not behaving correctly

On the 3rd of November, my game which involves a lot of WeldConstraints on moving parts suddenly broke without any update from me. Upon further investigation, I have narrowed down the cause of the issue to be with the way WeldConstraints behave. The documentation states that changing the position of a part that is welded will simply recalculate its offset from the part it is welded to. However, this behaviour is now broken.

REPRO:
This can be reproduced simply by using this code listed on the documentation:

local partA = Instance.new("Part")
local partB = Instance.new("Part")
partA.Position = Vector3.new(0, 10, 0)
partB.Position = Vector3.new(0, 10, 10)
partA.Parent = workspace
partB.Parent = workspace
 
-- Weld the two parts together
local weld = Instance.new("WeldConstraint")
weld.Parent = workspace
weld.Part0 = partA
weld.Part1 = partB
 
-- Update the position of the first part; the first part will move but the second will stay where it started
partA.Position = Vector3.new(0, 20, 0)

.rbxl place file: WeldBugReport.rbxl (20.5 KB)

Here is a video of what happens when this code is run. Notice that the parts appear in different positions on the client and the server:

Here is a further video where I used the following code. Notice how the part that is being repositioned is snapped to the center point of the part it is welded to:

local wall = workspace.BackWall
local root = workspace.ROOT
local rootC = root.CFrame

wait(10)

wall.Position = rootC * Vector3.new(0,10,0)

.rbxl place file 2: weldWeirdTest.rbxl (21.9 KB)

One more thing I have noticed is that the order of Part0 and Part1 seems to matter now. Depending on which way round they are the behaviour is different. The bug seems to happen 100% of the time when Part0 is set to the parent of the weldconstraint.

Conclusion
Thank you for taking your time to read this bug report. This issue has caused my game to become unplayable, and I am keen to understand why this might be happening and if it is possible to be fixed.

2 Likes

Can confirm I’m experiencing the same issue in two of my games Site 006 and SCP: Roleplay. Users have been reporting extremely disruptive door behaviour where they simply glitch out and completely block passage.

This is game breaking in my case, would love to hear more details about this bug.

Archive

https://media.discordapp.net/attachments/691354922645454878/773953664586743838/Screenshot_20201103-185145_Roblox.jpg?width=1429&height=677
https://media.discordapp.net/attachments/691354922645454878/773915611565785108/Screen_Shot_2020-11-03_at_3.43.20_PM.png
https://cdn.discordapp.com/attachments/691354922645454878/773628801833631775/unknown.png
https://media.discordapp.net/attachments/691354922645454878/773628645549015050/unknown.png?width=1082&height=677
https://media.discordapp.net/attachments/691354922645454878/773571937065893959/RobloxScreenShot20201104_103022738.png
https://cdn.discordapp.com/attachments/691354922645454878/773571681708408832/RobloxScreenShot20201104_102915917.png
https://cdn.discordapp.com/attachments/691354922645454878/773375444816494592/video0.mov
https://cdn.discordapp.com/attachments/691354922645454878/773356199885799444/Annotation_2020-11-04_081914.png
https://cdn.discordapp.com/attachments/691354922645454878/773327591259373608/unknown.png

3 Likes

Hello,
As this bug is preventing you from creating and improving your game, I would advise you to use workarounds for now, until the bug is either solved or reverted.

Some discussed workarounds:

  • Disabling and enabling the constraint back, while repositioning your part inbetween those steps.
  • Use the older Weld instances which will let you change the C0 & C1 at your will, although that would require some CFrame maths to get to work properly.

Kind regards,
Lanzareth.

3 Likes

Hey all, we’ve just reverted the latest change to weldConstraints. The replication issue should no longer occur in the repros above. More details on the change in a different, earlier thread below:

6 Likes