--weldconstrain

function module.weldconstrain(base, part, tim)
	part.Anchored = false
	
	local weld = Instance.new("WeldConstraint")
	weld.Parent = base
	weld.Part0 = part
	weld.Part1 = base
	
	
	game.Debris:AddItem(weld, tim)
end

function module.w_weld(base, target, tim, cf1)
	local w = Instance.new("Weld") 
	w.Parent = target
	w.Part0 = target 
	w.Part1 = base 

	local cf0 = target.CFrame 
	local cf1 = cf1 or CFrame.new(0,10,0) * CFrame.Angles(0,math.rad(45),0) 

	w.C0 = cf0:Inverse() 
	w.C1 = cf1:Inverse() 
	
	game.Debris:AddItem(w, tim)
end
return module
