What the title says. I’m trying to use ForeverHD’s Crate spin system Creating a Crate/Spin System, and I’m trying to make the stuff save. I already got the cash and the amount of items unlocked to save, the only thing left is the “Inventory” folder that has +1 objectvalue every time you unlock a new character/item. How can I make it save?
I’ve followed ALL tutorials on the internet; DevForum, Google, YouTube, everything. Nothing worked. That’s why I’m asking here
That’s the thing, the object values used in the spin crate system don’t have any actual values to them. It’s just an object value with a name, and nothing else, parented to one folder; there are no properties I need to save, I just need the actual instances to stay in the folder inside the player when the player rejoins
Why save as object values then, they have no value so loop through them, add their NAMES to a table and save it, when loading, loop through the table you saved, for every item create an object value with that name
by the way, yes, I know the error is that UpdateAsync isn’t set up properly, but I just saw a post explaining that I should use UpdateAsync instead of SetAsync because SetAsync can cause data loss so I just replaced SetAsync to UpdateAsync, but I don’t really understand how to properly use UpdateAsync so can you help me a bit with it please=
I’m not very experienced with scripting though, and DataStore2 seems too complicated for me and I don’t understand what to do with pcall, + I already use another saving module which is easy BUT doesn’t support tables/what I’m trying to do so adding another module like DataStore2 kinda seems pointless for my situation since having 2 ds modules wouldn’t be very practical ig
What I mostly don’t understand is what to put in the “oldData” thing that’s in every single UpdateAsync sample script; do I just put the table? Wouldn’t that be the new data though??