Inventory System - Followed Tutorial, Item Amount Resets After Maximum


Ah-ha! There it is.

The Array Index should be connected to the return “Empty Index 0.”

Without that connection, this code is correctly looking at each spot to see if its empty, but when it finds one, its not returning the correct empty number.

That’s why it seems to “reset” when the 10 stack isn’t moved - it’s getting overwritten by a new 1-stack, which thinks its found an empty spot. It’s also why if you move the 10 stack to another place, it doesn’t get overwritten - because this currently only ever overwrites the very first spot in the inventory.