plrs = {} function GetPlayerNames() For i, v in pairs(game.Players:GetChildren()) do if v.Character then table.insert(plrs, v.Name) end end end
Will this work?(I haven't tested)
The For
has the be lowercase, and it would be better to use :GetPlayers()
rather than :GetChildren()
Note: :GetPlayers()
only works on the Players Service