Inventory system concerns

Alright here’s what I did and it seems to work now:

local InventorySystem = require(script.Parent.InventoryService)
local Inventories = {}

game.Players.PlayerAdded:Connect(function(Player)
	local Inventory = InventorySystem.new(nil, Player)
	Inventories[Player] = Inventory
end)
game.Players.PlayerRemoving:Connect(function(Player)
	for i,v in pairs(Inventories[Player]) do
		print(i,v)
	end
end)
1 Like

I think that should work just fine too. Mark that as a solution now- but don’t be afraid to reply to me or unmark it if you have any problems or questions.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.