The model I am making is a drawer with a bunch of cups inside of it. I inserted a Script into the part of the model that the cups are attaching to so I could weld them together. However, since the cups are all the same and there is a lot of them, I don't want to weld them individually, so I tried to weld them all at once:
drawers = script.Parent
cups = drawers.Parent.Cups:GetChildren()
for _, child in ipairs(cups) do
CupWeld = Instance.new("Weld")
CupWeld.Parent = child
CupWeld.Part0 = child
CupWeld.Part1 = drawers
CupWeld.C0 = CFrame.new(child.Position.x,child.Position.y,child.Position.z)-Vector3.new(drawers.Position.X,drawers.Position.Y,drawers.Position.Z)
end
This works, sort of. The cups DO weld to the drawers, but they are all in one place. I want them to be in the position they were in before the script is run.

2 comments
No, this still has the same results: all of the cups are welded, but they are all in the same place
Apologies, it should work now.