How can I remove a specific value from a table?
I want to achieve something like this:
local tools = {"Apple", "Banana","Cane"}
table.remove(tools, "Apple")
How can I remove a specific value from a table?
I want to achieve something like this:
local tools = {"Apple", "Banana","Cane"}
table.remove(tools, "Apple")
Instead of value, you have to use the index itself when removing values from arrays.
local tools = {"Apple", "Banana","Cane"}
local index = table.find(tools, "Apple") --get the index
table.remove(tools, index) --remove the index