Weld Keeps Messing Up Builds

Hello, so I’m trying to script a tool for a customer, (I rarely build, just making this item a tool). And it just doesn’t want to get welded. Every time I weld it, it just flips for some reason. Any help would be appreciated.

Video showcasing what I’m talking about:

Thank you for stopping by. :slight_smile:

1 Like

You need an auto weld script. Something like this

function weld(part1, part2)
     local w = Instance.new("Weld")
     w.Part0,w.Part1 = part1,part2
     w.C0 = part2.CFrame:toObjectSpace(part1.CFrame):inverse()
     w.Parent = part1

Just call it on the command line and send in part1 and part2


I usually always use Weld Constraints for tools, always works (without the needing to script it), for some reason this problem started occurring to be recently, is it something to do with my settings?

I’m not sure because I’m not a modeler, but when I do model I always find it easier to use an automatic weld script. I always keep one around.

Wrote this code, works well now, appreciated:
local weld = Instance.new("WeldConstraint", script.Parent)
local h = script.Parent.Handle
local p = script.Parent.Plate
weld.Part0 = h
weld.Part1 = p