So I am making a table,
for i,v in pairs(game.Players:GetPlayers()) do
if v then
if v:FindFirstChild("Val") then
table.insert(plrsGame,v)
else
table.remove(plrsGame,v) -- The issue is here, it doesn't remove them (aka Line 62)
end
end
The error in output is:
17:28:43.540 - ServerScriptService.CoreScript.RoundMod:62: bad argument #2 (number expected, got Object)
I have also tried:
for i,v in pairs(game.Players:GetPlayers()) do
if v then
if v:FindFirstChild("Val") then
table.insert(plrsGame,v)
else
if not v:FindFirstChild("Val") then
table.remove(plrsGame,v)
end
end
end
But still won’t register
Any help on fixing this?