function weld(F,y,t)local n,j={}local function M(F)for F,y in pairs(F:GetChildren())do if y:IsA("\066\097\115\101\080\097\114\116")then if j then local F=Instance.new("\087\101\108\100")F.Name="\087\101\108\100"F.Part0,F.Part1=j,y F.C0=j.CFrame:inverse()F.C1=y.CFrame:inverse()F.Parent=j end j=y table.insert(n,y)end M(y)end end M(F)for F,n in pairs(n)do n.Anchored=y n.CanCollide=t end end weld(script.Parent,true,false)print("\068\079\110\101")

function weld(modelgroup,anchored,cancollide)
	local parts,last = {}
	local function scan(parent)
		for _,v in pairs(parent:GetChildren()) do
			if (v:IsA("BasePart")) then
				if (last) then
					local w = Instance.new("Weld")
					w.Name = ("Weld")
					w.Part0,w.Part1 = last,v
					w.C0 = last.CFrame:inverse()
					w.C1 = v.CFrame:inverse()
					w.Parent = last
				end
				last = v
				table.insert(parts,v)
			end
			scan(v)
		end
	end
	scan(modelgroup)
	for _,v in pairs(parts) do
		v.Anchored=anchored
		v.CanCollide=cancollide
	end
end

weld(script.Parent,true,false)
print("DOne")

