Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I put a player into a table?

Asked by 6 years ago
Edited 6 years ago

So this is the script that I have:

for i,v in pairs(game.Players:GetChildren()) do
    if v then
        wait()
        table.insert(_G.playersLeft, v.Name)
    end
end

What i'm trying to do is put every player into a table and when that player dies, that player gets removed.

Answer this question