save inventory with slots

I managed to save and load the inventory but when loading the icons fail since they are not placed in their slot
I would like to know how to save the slot with the item

without knowing more you likely dont need to save the slot you just need to update the slot post load.

i have the slot bind to an inventory updated event dispatcher.

if this isnt what you mean we’d need more details

Save items with slot indices and restore them on load to keep inventory order intact.

how do I do it? Any video or image to use as a reference?