I’ve been trying for about 1 hour to figure out why this table just comes back after printing it in another for pairs or using it works, when its already nill
i dont know why it does this, i also tried just not using the table anywhere outside of the prints
this is the code:
Players.PlayerRemoving:Connect(function(player)
for k, v in pairs(enemies) do
print(k,v)
for k2, v2 in pairs(v) do
if k2 == player.UserId then
print(k,v)
print(k2)
print(v2)
print("yo someone left")
v2 = nil
k2 = nil
v = nil
end
print(k,v)
end
print(k,v)
end
for k, v in pairs(enemies) do
print(k,v)
end
end)