Removing index from array

I am making an inventory system. I can right click on an item to remove it from inventory, and the item will disappear from my inventory. However, when I open the inventory again, the item reappears and I have still spawn it into the level.

I added a print string to see if the remove index function was even being called, and it is being called.

Any ideas what I might be doing wrong? Thanks.

Are you destroying the item? You are only removing the item from the array here, not destroying it. Maybe destroy the item first (e.g. by calling destroy actor or destroy component) and then remove it from the array.