When changing the position of a part with a weld constraint, the part gets snapped to the center of the part it is welded to. Here is a video of said behaviour:
This would seem to me to be a new behaviour which contraticts the behaviour specified in the documentation WeldConstraint
Here is a further video showing that this occurs from scripts using something like this part.Position = root.CFrame * Vector3.new(0,10,0)
This seems to be an issue involving the ordering of Part0 and Part1. From what I can see, swapping these around so that Part0 is the part welded to, the code runs correctly. This was not an issue before yesterday for me, and it has resulted in my game becoming unplayable.
WeldConstraints in Studio have Attachments that the CO and C1 are linked to.
If you place it in Studio you will see the WeldConstraint and the Attachment0 and Attachment1 will be shown as green spheres. Make sure you click the Models tab, then click ShowConstraints tool, as well as the Show Welds tool. When the Part is moved in Studio the Weld will automatically align to the Attachments.
Since you are putting this in Play mode the Position of the Attachments (relative to the Part) is set at 0,0,0 and will show in the Properties of the Attachments. When you move them in Play they will attach center to center since thatās how they work.
I was under the impression that changing the position of a part does not maintain the constraint, whereas changing the CFrame does. My game which involves a lot of weld constraints of this nature was working fine until today, when without any update, this behaviour started occuring.
I am also currently having this problem when building in workspace. It always seems to snap one of the parts to the center of the other. It also recently happened to me because, before that, all my other welding are fine. Only those that I just welded today are having this behaviour
Unfortunately my game relies on this mechanic as I have walls of an elevator that must be unanchored to move and be resized etc. This ābugā means that you cannot do something like this anymore:
local wall = workspace.BackWall
local root = workspace.ROOT
local rootC = root.CFrame
wait(10)
wall.Position = rootC * Vector3.new(0,10,0)
Here is a new video I recorded of this behaviour. It is strange that the part on the client appears in a different position to the part on the server. Something very strange is going on. It essentially makes it impossible to offset a part that is welded without first disabling the weldconstraint.
I have noticed that swapping Part0 and Part1, this script behaves as expected. Can anyone explain this? My issue is that up until yesterday, the order of Part0 and Part1 I had been using worked fine, and now all of a sudden changing the order of Part0 and Part1 changes the behaviour of the code. This seems to me to be quite a big issue.
I am also having an issue with weld constrains, this happened after the last update. I think it may be a change in the way weld constraints workā¦ in thatā¦ if you previously changed .position the weld constraint would not move all welded parts by the same amount. now an adjustment to .position will adjust all welded child parts.
I assume that swapping part0 and 1 works because one is considered the primary and the other are considered secondary so inheritance of values only words one way.
Havenāt found a solution yet. Personally i find this really annoying, and it only really is useful for low level builders, as it means welded meshes stay together when dragged in studioā¦which is why i assumed they did itā¦ even tho this has probably broken the majority of all physics based gamesā¦ really annoying and i would like a way to disable or a rollbackā¦
Seems to bug out in all kinda of unusual waysā¦So there is defiantly something up with weld constraintsā¦ There also appears to be this weird bug where the parts jump to the same position for odd reasons, when i go to server mode and stuff. So i just dunno. Maybe give it a few days and hopefully your code will just magically work againā¦ Go do some GUI or something
ā Create two parts and position them at the same height
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)
Getting some resultsā¦ But yeah all i can say is it looks like if you try to alter the .position of part0 in an weld, it goes weird. if you adjust part1 in weld it appears to work just as it used tooā¦
Yes clearly something updated on Robloxās side yesterday which has resulted in the documented behaviour not working correctly. I donāt know if just hoping it gets fixed is sensible, Iāve had to shut down my game because of this. Unfortunately Iām not of āRegularā rank, so cannot submit a bug report.
I dont think i can submit one either, wanna keep bumping this thread untill someone pays attention XD
That saidā¦My simulation has been running successfully for about 15mins now, so i guess its not a bug its a feature. I guess its now super important which way round you connect your constraintsā¦ looks like i only have 2 big things to fix. I guess i connected the other stuff the right way round the first time, so lucky me! So i guess iāll just deal with the annoying repositioning of hats when i copy and pasteā¦and get on with stuffā¦
Is your thing working again?
Also we cant be the only 2 people using weld constrains in physics objectsā¦so im very surprised there arent more people freaking outā¦? very odd
There is nothing in the changelog about this though, which is what I would expect if this is a deliberate feature change, and I am equally surprised at how there appear to be very few people affected by this - makes it feel like I must be doing something wrong.
Fingers crossed someone with more knowledge can impart some of their wisdom upon us, this is a very inconvenient situation.
well yeah, if WeldConstraint | Documentation - Roblox Creator Hub is no longer correct - and theres no changlog stuff its gotta be a bugā¦Tho after looking at the physics calculations, this appears to be the correct way round to do it. as it appears to be like 10% more efficient than i remember it beingā¦So i guess maybe they dont think anything is even brokenā¦and whoever wrote the wiki just didnt know??? maybe i dunno im speculatingā¦
This thread went long enough that in my opinion it should be moved by a moderator to Engine Bugs, if the following are true:
The thing OP is attempting to complete has been possible beforehand.
This happens due to the WeldConstraint, not an external specific thing in what they are attempting to achieve.
I think it would be alright if we can contact a moderator of the forum.
I only watched, didnāt comment, because welds really arenāt my thing, so Iām curious to see if the statements I think need to be achieved are.