How to reference a player who has left the game within a table?

I am trying to make a table that adds new players and removes ones who’ve disconnected, my only problem is that the table.remove() expects a number not the string, how would I reference the player as they are in the table not just as their name?

use table.find.

table.remove(plrs, table.find(plrs, plr))

table.find returns a number within the table which was equal to the requested value.

You are my personal hero tonight it seems.

I just happen to be on right now, but seems so!

1 Like