This script is shortened and I'm trying to remove a picked table input from the table (RaresTable is the table).
Can someone please help me? This third line is the line with a problem.
1 | local RaresDecided 1 = RaresTable [ math.random( 1 ,#RaresTable) ] |
2 | print (RaresDecided 1 ) |
3 | **table.remove(RaresTable, RaresDecided 1 )** |
When using table.remove(), it requires two parameters: the table an item is being removed from and the position the item being removed is at in the table.
For example, look at this:
1 | example = { "yo" , "hi" , "sup" } |
2 |
3 | table.remove(example, 2 ) |
This code would remove "hi" from the table "example".