"Okay more help is needed, these are defined already and when I do this it isnt removing the player from the table but the script keeps running fine
local plyr = {#mytable, player};
table.remove(plyr)"
The "remove" table function does not remove any particular element per-se. Rather, it removes the element at a particular position.
This is actually quite useful, given the example below:
Array = {1,2,3,4,5,5};
table.remove(Array,#Array);
The above example would remove the duplicate 5 from the table, given that it within the last position of the table, which is equivalent to the table size in this particular scenario.
The first "argument" is the actual table, which would be "Array" in the above example. The second "argument" is merely the position of which you would like to remove any present element. |