Just a question about the table.remove()

Say I have a table:

local abc = {player1, player2}

table.remove(abc, table.find(abc, player1))

Would player2 now become abc[1] or would it stay as abc[2]?

Thanks for any help

1 Like

has it ever crossed your mind that this question literally answers itself when put into the command bar?

local abc = {"player1", "player2"}; table.remove(abc, table.find(abc, "player1")); print(abc)
image

1 Like

Like @overflowed said, it literally tells you. Here’s the description of table.remove:
image

1 Like