This has been a topic that many people have talked about, but I feel like mine isn’t as cut and dry. In my system, the tools have different values associated with them. For instance, I could have a weapon that has a level. You level up the weapon and that increases it’s damage. I can’t save tools in a datastore because I have data that’s unique to the user AND the tool. So, I can’t just store the tool by its name into the datastore, because that cuts out the other vital information, like the tool’s level.
So, should I just create a folder for each player that stores the player’s tool objects? Is that even possible? Will that save across servers and sessions?
This uses DataStores to store tools by their name. This is specifically what I said that I can’t do because of the way the tools are set up. Each tool is unique, so drawing from a list of prefabbed tools and just comparing their names doesn’t make sense.
I would suggest saving each tool’s stats in a table.
Essentially, save one big table to a datastore containing smaller tables that store important information about each tool.
Keep a folder of template tools somewhere in ReplicatedStorage or ServerStorage and clone them into the player’s inventory accordingly, then apply the properties and values specific to each tool from that datastore.
This is a better option. I just need a unique identifier for each tool. For instance, instead of just having “sword”, I would have to have “sword_12345” so that I can pair each tool to their respective data in the datastore. So I wouldn’t necessarily be storing the tools, just their data, then cloning that data to the templated tools from ReplicatedStorage or ServerStorage.