Table.remove doesnt work

The table.remove doesnt work and it cleary prints out that the bomb didnt get removed from the table
and i dont know what is the issue can someone help me?

   		table.remove(Bombs, otherTile.Name)
				
				if table.find(Bombs, otherTile.Name) then
					
					 print(otherTile.Name .. " Didnt get removed")
				
				end

table.remove takes the item’s index, not value.


If your table is an array, do this:

table.remove(Bombs, table.find(otherTile.Name)) -- table.find returns the value's index in the table. If it doesn't exist, it returns nil

If it’s a dictionary, do this:

Bombs[otherTile.Name] = nil
2 Likes

Woah i think it works thank you!