Old datastore methods are now broken, what now?


  • The title says it all, now what do I do to make data save?


  • @mlgwinners what "old data store methods"? just use DataStoreService!


  • @mlgwinners

    Do you mean DataPersistence? Yup, deprecated (Even lost It's own wiki page). Use the Data Store Service instead. (If you prefer a tutorial, here it is).


  • @Aimarekin i remember using data persistence back in 2014 it was nice but it was limited to the player. DataStoreService isn't limited to players and they don't even need to be in the game. Though I did like that you could store instances in data persistence

  • Global Moderator

    I think he's saying that because his PlayerRemoving event listener doesn't always save his players' data.

    That would be because the event listener is never called when the server shuts down.

    Which can happen when the last player in a server leaves, by manually shutting down all game servers from your game's page, or if the server encounters a network error and must close.

    The solution is to use a game:BindToClose() listener, which will be called by Roblox before the server shuts down, to save every currently connected player's data asynchronously.

    Since many users have been having problems with this recently I might eventually write a forum tutorial about just that.


  • @Link150 yes please a tutorial

Log in to reply
 

Looks like your connection to Scripting Helpers was lost, please wait while we try to reconnect.