No Problem mate I'm Glad that helped you
Before anything, I would like to point out that the Post got deviated and that we are talking about how to store UID and Pick them in general so what I'm about to write it has nothing to do with your original problem which it got fixed already as you didn't need to Pick by UID, I say this just in case because I don't wanna confuse you, so now we are strictly talking about how to Store UIDs & Pick them in General.
Although I am unsure on how to go about creating an instance variable with a uid so this dosent happen?
Would be easier if you give any Example of any situation that you need to store UIDs so you can easily relate to it other ways its impossible to give an example as the range for Picking are endless and it varies depends on the situation or Mechanics that you are doing.
There are many Types of Picking as an example you got
-Pick By (IID or UID)
-Pick By "Comparison"
De difference between (IID or UID) Vs "Comparison" is that Picking by (IID or UID) Picks directly the object or Instance without looping through all the Objects or Instances as Opposite of Picking by "Comparison" which has to loop through all the Instances of the Object to filter who match the "Condition" therefor adding them to the "Picking List" which means they are automatically Picked so any Actions that you have on that Event they will Apply to all the Instances Picked on the Picked List
So if you have a lot of Instances of an object the best results you can get its to pick by "UID" whenever is Posible to avoid unnecessaries Loops. But if you don't have many Instances Picking by "Comparison" its fine
As you can see Picking By (IID or UID) have only Two Possibilities but Picking By "Comparison" has a huge range of possibilities that you can use to give some examples:
You can use them To Pick or you can use them to filter the already Picked List
-Is "Attack" Animation Playing?
Any Instances that matches the Condition is Picked so any Actions from this event will apply to all the Picked instances that are Playing "Attack" Animation
-Is Frame = "5"
The same as above any Instances that have (Frame =5) are Picked
Some Times it's not enough with one condition to filter the ones you need to Pick so you can add as much as conditions as you need
Example Two Conditions:
-Is "Attack" Animation Playing?
Is Frame = "5"
So here unless the Instances are Playing Animation "Attack" & the Frame =5 they will be not be Picked but any instances that match both conditions it will be Picked
So basically Anything that you can use as a reference to Pick the ones you need its good, this will vary depends on the many situations you will encounter, there is no specific method to Pick, the method will be based on the circumstances, example someTimes you will Pick by
And finally just to give a random example as to how to store and Pick by UID most probably has nothing to do with your Project but it is just to have an overview. Although you could do this with containers without the Need of UIDs it is just for training purposes
By Comparing Instance Variables
I hope you get an idea and that I didn't confuse you