Having the same 'things' as different 'things' Puzzle / Problem

Hey, I want to make it so that if for example in the inventory there is an item, it has its own little gui object and I recieve another of the same it just creates a new gui object for that item , okay sounds simple and is actually the easiest thing, But in a script where it checks the players inventory and makes gui objects for all of the inventory items I want it so if the inventory already has that item from the inventory table/dictionary it doesn’t make a new gui for it BUT if there is a new same item then it does,

Näyttökuva 2022-08-06 231426
Here, there are 3 swords, they are all the same , but kind of also not , but they are the same.

I want Each of those swords to have its own gui object created,But let’s say the Player already has 2 swords and recives a third one and it runs the script, I need it to add only one more sword gui object to the inventory gui, that is if the inventory already has the other 2 swords gui objects’

if not InventoryGui:FindFirstChild(v4) then

is what I tried , but because in the array they are strings it finds the name of the sword and is like “ok, there is one already , let’s not add the rest”.
So, what I believe Could and could not work is changing the strings to another value, but I am not sure yet is that the best option?

I think this is really interesting

Here are a few options

  • Instead of storing them in the array as strings why not just store them as instances?
  • You can delete the other sword guis and then recreate all of them.
  • You could use .ChildAdded