Hey! so theres a local script in my game that i use to handle some things and in it theres a table in that has all the players ingame, but for some reason everything in that table is becoming nil
Can anyone help me fix that?
The Script
local plrlist = {}
for i,v in pairs(game:GetService("Players"):GetPlayers()) do
if v ~= game.Players.LocalPlayer then
table.insert(plrlist, v.Name)
end
end
game.Players.PlayerAdded:Connect(function(v)
if v.Name ~= lplr.Name and not table.find(plrlist, v.Name) then
table.insert(plrlist, v.Name)
end
end)
game.Players.PlayerRemoving:Connect(function(v)
if table.find(plrlist, v.Name) then
table.remove(plrlist, table.find(plrlist, v.Name))
end
end)