return function(z,j,I)local Z=Instance.new(I and"\077\097\110\117\097\108\087\101\108\100"or"\087\101\108\100\067\111\110\115\116\114\097\105\110\116")Z.Part0=z Z.Part1=j if I then Z.C0=z.CFrame:inverse()*j.CFrame end Z.Parent=z return Z end
--[[
	
	Welds part A to part B using a WeldConstraint (returns weld)
	
	Functions.Weld(
		partA,					<-- |REQ| 	Part instance
		partB,					<-- |REQ|	Part instance
		isManualWeld			<-- 		true = ManualWeld, false = WeldConstraint			[defaults to: false]
	)
	
--]]

return function(a, b, isManualWeld)
	--- Create weld
	local weld = Instance.new((isManualWeld and "ManualWeld" or "WeldConstraint"))

	--- Set part adornees
	weld.Part0 = a
	weld.Part1 = b

	--- If manual weld, set CFrame
	if isManualWeld then
		weld.C0 = a.CFrame:inverse() * b.CFrame
	end

	--- Part to part A
	weld.Parent = a

	--
	return weld
end
