... --Code
fireClientGui.OnClientEvent:Connect(function(ItemName, ItemCategory, itemID)
local Stack = 0
--[[ --Not Related--
local invFrame = Inventory.Menus.InvFrame
local All = invFrame.ScrollingFrameAll.ItemHolder
local Furniture = invFrame.ScrollingFrameFurniture.ItemHolder
local Shapes = invFrame.ScrollingFrameShapes.ItemHolder
local item = game.ReplicatedStorage.Parts.ItemFrames[ItemName]
local itemCopy = item:Clone()
itemCopy.Name = ItemName
--]]
for _, v in pairs (game.Players.LocalPlayer.owneditems:GetChildren()) do
print(v.Name)
print(itemID)
if v.Name == itemID then
Stack += 1
end
end
print(Stack)
... --More Code
--This is the output i get
1 - Client - ItemInvScript:25
1 - Client - ItemInvScript:26
0 - Client - ItemInvScript:31
So basically i have an inventory system.
Each item is referenced by an item ID - in this case:
ItemName = Cube,
ItemCategory = Shape,
itemID = 1,
The name and category isn't important - but it will store the item by ID number not name.
It SHOULD increment since the output shows that they both the same but 'Stack' will not increment for some reason
** You are now Level 4! **