hello so idk what and why but it doesnt work with this code?
local function FindTotalPetsNumber(Table)
print(Table)
local TempCounter = 0
for i, v in pairs(Table) do
print(player.UserId, i)
if player.UserId == i then
print("found")
for y, x in pairs(v) do
TempCounter += x
end
end
end
print(TempCounter) -- it prints 0
return TempCounter
end
it prints until the print(player.UserId, i) even though player.UserId is the same as i.
am i dumb and not understanding something?