Looping through a table with ipairs doesn't update

It nearly works, I just switched events fired and it does work but when again, I when the item move from inventory to trunk it doesnt wanna show up in the trunk frame, I have to activated proximity prompt again for it to appear which is strange.

Well I found out that it was because I was deleting the button after I moved it lol. It works while activating proximity prompt because it loaded the buttons back in. But now the problem is that after moving an item from inventory to trunk and then back to inventory I can’t move it to trunk again for some reason.

I put print on end of 4 of those events. So whenever button is clicked it prints and whenever the button is added. And I found out that when opening the gui it prints clicked like 4 times, when I click on a button it prints added but doesnt print clicked.