Hello Dev Forum, I was making an inventory system but when I tried to make a remove item function, I noticed that the indexes in the dictionary used in the system remained un-effected. I would like to know if there is any way to resolve this.
Examples
local Dictionary = {
[1] = {Name = "Apple", Value = 1}
[2] = {Name = "Orange", Value = 2}
[3] = {Name = "Banana", Value = 4}
}
table.remove(Dictionary,2)
print(Dictionary)
Output:
[1] = {Name = "Apple", Value = 1}
[3] = {Name = "Banana", Value = 4}
I simply want the 3rd index to turn into the 2nd index.