Hello,
Currently, I am trying to store player’s units/towers in a module script:
export type Inventory = {
Currency: Currency,
Items: Items,
Units: {Unit}
}
export type Currency = {
Coins: number
}
export type Items = {
Candies: number
}
export type Unit = {
OriginalOwnerID: number,
Name: string,
Level: number,
}
local module = {}
local Inventories = {}
In the inventory GUI, a frame will be created for every unit the player has collected, but I am having difficulty thinking of a way for me to map these frames to the units stored inside the module script, is there a better way than assigning a GUID to every unit and then mapping them to each frame by placing the GUID in the frame attribute? Will assigning a GUID for every unit be too wasteful? Considering I will need to store these in the datastore. Thanks in advance!