im trying to order these frames so that the loop checks if the frame is empty and if it dosent skips over it, the problem is that it skips over some slots because it is unorganized
example:
outputVV
2 (i) slot1(v) - Server - Script:13
3 slot2 - Server - Script:13
4 slot3 - Server - Script:13
5 slot6 - Server - Script:13
the codevvvvvvvvvv
local part=script.Parent
part.ProximityPrompt.Triggered:Connect(function(plr)
local sg=plr.PlayerGui.backpack
for i,v in sg:GetChildren() do
if v:IsA("Frame") then
print(i, v)
if v.itemtype.Value=="0"then
v.itemtype.Value=part.partype.Value
v.itemamount.Value=part.partype.typeamount.Value
sg.triggercheck:FireClient(plr)
break
elseif v.itemtype.Value=="wood" then
v.itemamount.Value+=part.partype.typeamount.Value
sg.triggercheck:FireClient(plr)
break
end
end
end
end)