Hello all!, I have some struggles with my scripting today and I would like some knowledge on how to go around these issues.
I have made the store for the players items they have =
But I wanna make a inventory gui where all of the armor pieces and items owned show up in a ui grid layout.
like this:
I am not experienced with inventories as you can tell, so I looked around some tutorials , but I have a problem where I don’t know how to get the contents of the armor dictionary’s tables (I need the contents ) aswell as the Weapons dictionarys contents, can they be got at once somehow, and how would I make a good inventory system for them, mainly I need to know how to get the contents at once, but some help on the inventory itself would be great.
local function setupInventory(Player)
local Profile = Datastore[Player]
local Inventory = Profile.Data.Items
local PlrGui = Player:WaitForChild("PlayerGui")
local InventoryMainGui = PlrGui:WaitForChild("Inventory")
local InventoryGui = InventoryMainGui:WaitForChild("MainFrame"):WaitForChild("Inventory")
local armoritems = Profile.Data.Items.Armor
local WeaponIntems = Profile.Data.Items.Weapons
if type(Inventory) ~= "table" then
for _ , v in pairs(Inventory) do
local itemgui = game.ReplicatedStorage:WaitForChild("Gui"):WaitForChild("Template"):WaitForChild("Item")
itemgui.Name = v
itemgui.ItemName.Text = v
itemgui.Parent = InventoryGui
end
end
end
I have been really struggling with this today so help would be more than great towards my scripting experience.