To explain a bit, players is a table, and when a player joins, it adds the player. I only get this error when removing, not in other parts of the script. The code is here:
function rem(p)
for _, v in pairs(1, #players) do
if p.Name == players[v] then
table.remove(players, players[v])
print (players[v].." left!")
end
end
end
It gives me the error: 21:03:17.548 - Workspace.Script:77: bad argument #1 to 'pairs' (table expected, got number) 21:03:17.550 - Stack End

1 comment
How are you defining players? Also, you do not need the 1, that's what's throwing the script off saying you got a number.