WeldConstraints and normal Welds move Part1 to Part0

Hello! Today when I was welding some meshes together my Part1 moved to the center of Part0, it’s unanchored and cancollide off when I tried to run the game the Part1 doesn’t follow Part0’s orientation I wrote some really simple code to move here it is: it so I dunno why won’t it work, any help is welcome!

while true do 
	script.Parent.Orientation += Vector3.new(0, 3, 0)
	game:GetService("RunService").Heartbeat:Wait()
end
4 Likes

I’m pretty sure for the part to move along with its welds you have to change the CFrame and not Position/Orientation. I’ve had this problem happen before

1 Like

Hi! Thanks for the code but I don’t have any problems with the code, the problem are welds, I want to weld a part to another part (meshpart to be specific) but it just resets the Part1’s center to be Part0’s center

But what’s the issue? I want to weld it, I don’t have any weld scripts

If you have anything that connects 2 parts, for example welds and Motor6Ds, you can move PartA using Position and Orientation. But, this will not make PartB move along with PartA. Therefore, you need to change PartA’s CFrame to allow the welds/Motor6Ds to work in the indended way.

TD;DR
Set CFrame so that welds and Motor6Ds can update accordingly.

I’m working on it, except when I actually weld the thing in studio Part1 is moved to the center of Part0, while it should keep it’s position and orientation

That’s a known effect when you add a weld in the explorer/Instance.new it. You can use WeldConstraints though, it’s a lot easier to use.

Same thing happens with WeldConstraints

Uh, so I opened the model in another place (a baseplate) and it works, idk how, idk why but it works I’ll try to find out why

2 Likes

Most likely another part or script was interfering.

1 Like

Except that happen in studio, not test mode (where scripts don’t run) :sweat_smile: