I have an inventory menu. I’d like to be able to have it refresh whenever I removed an item from my inventory without having to close and reopen my menu.
Right now, when the inventory button is clicked, it draws the panels/etc and then calls the function DrawModels() to draw the SpawnIcons.
DrawModels() uses a for k, v in pairs(tab) loop to look through the player’s database and then draw an icon for each item. This works great.
The problem is that if I call the function whenever an item is used ( to redraw the spawn icons ) the old icons are still there. It does indeed redraw them, but the old ones are left over.
I can’t add “icon:Remove()” to the DoClick part for the icon ( which also removes that item from the inventory ) because then it will only remove that single icon, and I need them to all refresh.
Any help would be greatly appreciated!