Parts dont weld to the right arm the second time

so im trying to weld 3 parts to the right arm.
when i use my skills, the first time the parts weld perfectly to the right arm and then they get removed, but the second time the just spawn to the workspace without welding and just fall off of the map.
i tried to check while i was testing the weld properties and i saw that when the 3 spawns they dont be the Part1 of the welds.
here my script

script.Parent.W.OnServerEvent:Connect(function(plr)
	
	local rs = game:GetService("ReplicatedStorage")
	
	for i,v in pairs(workspace:WaitForChild("God"):GetChildren()) do
		if v.Name == "Part1" then
			local w1 = Instance.new("WeldConstraint")
			w1.Name = "W1"
			w1.Parent = plr.Character:WaitForChild("Right Arm")
			w1.Part0 = plr.Character:WaitForChild("Right Arm")
			w1.Part1 = v
			v.Position = plr.Character:WaitForChild("Right Arm").Position
			
	for a,b in pairs(workspace:WaitForChild("God"):GetChildren()) do
		if b.Name == "Part" then
					local w = Instance.new("WeldConstraint")
					w.Name = "W"
					w.Parent = plr.Character:WaitForChild("Right Arm")
					w.Part0 = plr.Character:WaitForChild("Right Arm")
					w.Part1 = b
					b.Position = v.Position
					
	for c,d in pairs(workspace:WaitForChild("God"):GetChildren()) do
		if d.Name == "Part3" then
							local w3 = Instance.new("WeldConstraint")
							w3.Name = "W3"
							w3.Parent = plr.Character:WaitForChild("Right Arm")
							w3.Part0 = plr.Character:WaitForChild("Right Arm")
							w.Part1 = d
							d.Position = v.Position
	wait(4.5)
	v:Destroy()
	b:Destroy()			
	d:Destroy()
						end
					end
				end
			end
		end
	end
end)

how can i fix this?

Your for loops are operating on the same set of children each time. After the first loop, v (and w) will be gone, so v.Position will be nil. If you want it to work, you need to make sure you’re looping over all of the children every time. One way to do that is to make a copy of the array of children, then loop over that. Something like this:
local godChildren = workspace.God:GetChildren()
for i, v in pairs(godChildren) do
– …
end
for a, b in pairs(godChildren) do
– …
end
for c, d in pairs(godChildren) do
– …
end