I was using table.insert() to add in players but I want it to clear using table.remove(), but I think table.remove only removes one chosen variable, I want it to remove all. Any help please?
Well, there are many ways of doing it, but here are two.
Way 1: The pointlessly excessive way
function clearTable(tab) for i,v in pairs(tab) do table.remove(tab,i) end end
Way 2: The nice and elegant way
Table = {}
Way 2 just overrides the old table with a new fresh blank one.