local players = {""} game.Players.PlayerAdded:connect(function(player) local getPlayerNames = game.Players:GetPlayers().Name table.insert(players, getPlayerNames) wait(0.1) print(table.concat(players, ", ") end)
I am trying to make a table that holds the value of all of the player's names in the server, but the above code doesn't work. Can someone help me out?
First off, let's address the issues:
Let's fix those problems now.
local players = {}; game.Players.PlayerAdded:connect(function(player) table.insert(players, player.Name); wait(0.1); print(table.concat(players, ", "); end);
NOTE: The wiki is a great place to research anything you don't understand