So my data keeps getting wiped for a game I’m making, and I have a save data script made. Is it just me or do I need to do something else?
Data wiping is typically an issue with the developer’s code. Sometimes, DataStores experience internal issues with endpoints or otherwise, though that’s a rare case.
Would you mind posting your data management script so that anyone viewing this thread can attempt to help you?
If you’re testing the game in Studio and it isn’t saving/fetching data, this could be because you haven’t allowed Studio to access API services such as Datastores. Try setting “Enable Studio Access to API Services” to true, if you haven’t already.
This can be found on the “Configure game” page
Oh. Yeah, you aren’t supposed to use that. SaveInstance is part of Data Persistence, which is deprecated. The proper way to save data is through the DataStoreService. Feel free to search it up on the Developer Hub for articles on how to use it.
Ah, okay. Thank you for letting me know.
SaveInstance is deprecated, you should use DataStoreService instead!
I’d advise against using that code. It’s heavily flawed and the way it’s designed will cause throttling and data failures. DataStores have their own limitations to follow.
I can’t really tell you how to fix this since it’s fairly dependent on the structure of your game, but just know that it’s better to save a single table to a DataStore instead of saving many values in a loop.
It’s not just deprecated, it was completely removed.
No, you can still use it in scripts. It was not completely removed.
Wiki page saying it’s deprecated:
The function still exists; the functionality was removed. SaveInstance, SaveNumber, etc. don’t work anymore. It works in studio in the command bar, but not in live games or in studio play solo. They still “work” in scripts (they don’t cause errors) because it would break games that used them more than they’d break with the lack of Data Persistance.