This code cycles through a dictionary of dictionaries to find the dictionaries that have elements in them. An example of a filled dictionary would be ["Bucket"] = 1
in dictionary v
. How would I get the script to print [“Bucket”] instead of just 1? I need both parts in order to map the inventory I’m making correctly.
game.ReplicatedStorage.Inventory.MapInventory.OnClientEvent:Connect(function(Inventory)
local CurrentItem
for i,v in pairs(Inventory.Data) do
for a,b in pairs(v) do
if b then
--Issue here
end
end
end
end)