Inventory system not working [reuploaded]

I reuploaded this because there’s a new post almost every minute and mines is 12 hours old

Heya folks, as you can tell by the title an inventory system with a module I made isn’t working. I tested it and changed a ton of things but for some reason, the inventory table is always empty and it’s filled up only within the give script? Not sure what’s happening here, i’ve checked the other posts but none of them solved my problem. Help is appreciated.

inventory = {
	
}

invfunction = {}

function invfunction:Getsize()
	return #inventory
end

function invfunction:AddItem(plr,object,counter)
	if not plr then
		warn("Not a player, returning")
		return
	end
	
	if not inventory[plr] then
		print("Created inventory, inventory didn't exist")
		inventory[plr] = {}
	end
	
	for i,v in pairs(inventory[plr]) do
		if v.item == object then
			v.count = v.count + counter
			print("Added "..counter.." Count to "..object)
			print(inventory[plr])
			print(#inventory)
			return
		end
	end
	--inventory[plr][object] = inventory[plr][object] + counter
	table.insert(inventory[plr],{item = object,count = 1})
	--inventory[plr][object] = 1
	print(object.." Did not exist, created value")
end
function invfunction:AddPlayer(plr)
	if not plr then
		warn("Not a player, returning")
		return
	end
	
	if inventory[plr] then
		warn("Player already exists, returning")
		return
	end

	inventory[plr] = {}
	print("Created inventory")
end
function invfunction:Get(plr)
	if not plr then
		warn("Not a player, returning nil")
		return nil
	end
	if not inventory[plr] then
		warn("Player doesn't exist, returning nil")
		return nil
	end
	return inventory[plr]
end

return invfunction

Like I said, when.I print the results in the module script give function, it shows them but anywhere else and it has no values inside the inventory table (it seems like the get function is the issue not sure).

Forgot to mention that it does create a player table but what’s inside the player table isn’t being read, isn’t there? not sure.