for i, itemButton in pairs(InventoryGui.ItemList:GetDescendants()) do
if itemButton:IsA(“ImageButton”) then
itemButton.MouseButton2Up:Connect(function()
local itemFrame = itemButton.parent
local itemValue = Inventory:FindFirstChild(itemFrame.Name)
if itemValue.Value > 0 then
local DropItem = DropItem:InvokeServer(itemFrame.Name)
if DropItem == true then
if itemValue.Value > 0 then
itemFrame.ItemQuantity.Text = itemValue.Value
else
itemFrame.Visible = false
end
end
end
end)
end
end
dont work please help me more idk why dont work im make that help more
for i, itemButton in pairs(InventoryGui.ItemList:GetDescendants()) do
if itemButton:IsA(“ImageButton”) then
itemButton.MouseButton2Up:Connect(function()
local itemFrame = itemButton.Parent
local itemValue = Inventory:FindFirstChild(itemFrame.Name)
if itemValue.Value > 0 then
local DropItem = DropItem:InvokeServer(itemFrame.Name)
if DropItem == true then
if itemValue.Value > 0 then
itemFrame.ItemQuantity.Text = itemValue.Value
else
itemFrame.Visible = false
end
end
end
end)
end
end