local h = script.Parent
local g = script.Parent.Parent
local hm = nil
for i,v in pairs (g:GetChildren()) do
if (v ~= h) and (v.ClassName == "Part") then
v.Name = "Part"..i-1
hm = i
end
end
wait(1)
for i=1,hm do
p = g["Part"..i]
P0 = CFrame.new(h.Position.X,h.Position.Y,h.Position.Z)
P1 = CFrame.new(p.Position.X,p.Position.Y,p.Position.Z)
w = Instance.new("Weld", h)
w.C0 = P0
w.Part0 = h
w.C1 = P1
w.Part1 = p
end
So, what this does is that it automaticly welds multiple parts, without doing to much writing over the script. But theres a small problem, the parts keeps bugging around. How do i fix this?
