So then I tried this and got; Players.Player1.PlayerGui.ArmoryGui.LocalScript:7: bad argument #1 to '(for generator)' (table expected, got nil)
function test()
game.Players.LocalPlayer.Backpack:ClearAllChildren()
x = script.Slot1:GetChildren()
for i,x in pairs do
x:Clone().Parent = game.Players.LocalPlayer.Backpack
end
z = script.Slot2:GetChildren()
for i,z in pairs do
z:Clone().Parent = game.Players.LocalPlayer.Backpack
end
end
script.Slot1.ChildAdded:connect(test)
script.Slot2.ChildAdded:connect(test) |