playing = {} for i, v in pairs(game.Players:GetChildren()) do if v.Character then if v.Character:FindFirstChild("Ingame") then playing = {v.Name} end end end
I need to know how to insert player's names into a table. Like in many survive disasters games(Not for one) they show all the surviving players names in a message. How would I make that except only the names in a table?
local playing = {} for i, v in pairs(game.Players:GetPlayers()) do if v.Character and v.Character:FindFirstChild("Ingame") then table.insert(playing, v.Name) end end print("Playing: "..table.concat(playing, ", "))