[Solved] Welding a non-collidable part forces the whole model to move

I had this script on for a while and it use to have no issue a month ago. I have been offline for a month and I came back to it no longer working. I have made a flying ww2 zepplin and when the players mouse hovers over it, a part with a decal is created, positioned under the zepplin, then welded to the zepplin. Now when I weld the part to the zepplin, the zepplin moves to the part. The parts collision is off, it’s anchored, and its weld.c1 so I do not know why this happens.

function Weld(Torso, part)
     local weld = Instance.new("Weld", part)
     weld.Part0 = Torso
     weld.Part1 = part
     weld.C0 = Torso.CFrame:inverse()
     weld.C1 = part.CFrame:inverse()
     part.Anchored = false
end

Regular code:

Select.CFrame = unit.Hull.Torso.CFrame --Puts the part to the zepplins main part
Select.Position = Vector3.new(Pos.X, Pos.Y - (Size.Y/2), Pos.Z) --Puts the part under the zepplin
Weld(unit.Hull.Torso, Select)

Like I said, this code was working just fine until I came back after a month. So in the code I set the parts CFrame to the Zepplins main part(Torso.) Then I make the part go under it. Finally, I weld the part to the zepplin so that while the zepplin is flying the part goes with it. Since I came back the part would move under the zepplin but then the zepplin would go down to where the part is. So basically any time I hover over the zepplin, It just moves down.

What??? That is not correct in the slightest.


Is the part you’re welding very large compared to other parts in the model? Please include more of your code. There is not enough detail or context in what you’ve provided.

My initial idea is that this may be the zeppelin assembly’s root part accidentally changing to the part you’re attaching, resulting in the whole zeppelin moving when you create the weld. Try enabling the Massless property on the part before you create the weld. You might also want to try a WeldConstraint.

3 Likes

WeldConstraint instead of regular welds works now. Thank you. I didn’t change anything except for how I weld it.