✓ Accepted answer
Because it only finds the welds in the "top level". :GetChildren() returns a table of all children, not all descendants which is exactly what you need. You can solve this problem by either creating a table with all children, or by creating a way to loop directly over all children.
In most cases, you will see people doing this:
function Delete(Where, What)
for _, Instance in pairs(Where:GetChildren()) do
if Instance:IsA(What) then
Instance:Destroy()
end
Delete(Instance, What)
end
end
In your case, you would call Delete(g[i], "ManualWeld")
You might wonder why I define a function for this with an extra argument. It's good practice to write such functions, as you will find out that you need those again. You can then reuse this code to for example delete all decals on a car!