I am trying to create a inventory system and so far i have it set up in a table with different frames and values objects. What im doing is trying to test it by having a clickconnect and fireclient on a log that is on the ground. What it should do is once a person clicks on it, then first available imagelebel on the inventory should take the id from the log and put it into the table. Everything seems to run but the imagelabel doesn't change neither does the textlabel which should show the amount.

local slots = game.StarterGui.backpackgui.mainframe.Frameright 
local inventory = {slots.slot1, slots.slot2, slots.slot3, slots.slot4, slots.slot5, slots.slot6, slots.slot7, slots.slot8}
local cleanslot = game.StarterGui.backpackgui.mainframe.Frameright.slot9

remote.OnClientEvent:Connect(function(item)
	print(" click succes")
	for i, v in pairs(inventory) do
		
			if v.item.Value == item.Name then
			v.TextLabel.Text = v.TextLabel.Text + item.amnt.Value
			v.amnt.Value = v.amnt.Value + item.amnt.Value
			print("Found")
			else
			
	
	
		if  v.item.Value == cleanslot.item.Value then do
			print("image empty")
			v.amnt.Value = item.amnt.Value
			v.maxamount.Value = item.maxamount.Value
			v.ImageLabel.Image = item.image.Value
			v.TextLabel.Text = v.amnt.Value
			
			break
		end
		end
	end
			end
			
	

	end)

1 comment

0

on line 18 it prints which is what i want but then lines 19-22 don't seem to do anything and thats the thing i want done.