So I'm having bit of an issue here. This is my script so far. Also the prints are just for debugging and so you can see what it is.
--source removed
Whoever enters a region (a 2048x2048 part is used to define regions), will be added to a table. That part completely works.
The issue I'm having is when someone leaves a region, which works from my IsTouch script, I don't know what row their name is on, using table.remove.
Table.remove doesn't remove strings, it removes rows. Look below for an example.
--source removed
The example above will remove the second thing in the list, since it's the second in a row. If you were to print the entire table after removing "2", it would print "wont be removed" twice.
My main issue is figuring out what the names row is on, since everyones name is different and they can be added at any time, how can I detect which row the name is on?

2 comments
Use a for loop to iterate through all the elements inside the table until it finds the desired one and store its index on a variable.
Since I have so many people going into regions, how can I make a variable for one person? Do I have to use DataStore?