Hey! Yesterday i was testing some stuff and few players experienced data loss, but i have no idea and i haven’t found anywhere clear answer on how to revert player’s data to previous versions.
To make it clear, i want to revert player’s data. The instance i’m saving is Table with model data (cframe, rotation, etc.). Also i’m not using Bereeza’s method or DataStore2.
I’ve already looked up throught DevForum and DevHub, but i haven’t found answer anywhere.
Unless Roblox’s support team have a solution, I believe Player Data and history is something you would need to set up and manage yourself.
For future iterations you could probably create a scope called ‘DataHistory’ or something - that upon updating your player’s Data - gets and stores the existing data in the History, before saving new data.
You might only desire to store up to 2 saves old of player data for cost sake but I can’t think of another solution.
Psudo
PlayerCurrentData = { data }
PlayerNewData = { newData }
Save PlayerCurrentData to PlayerHistory scope
Save PlayerNewData as CurrentData
on reversion
Lookup PlayerHistory
Overwrite PlayerCurrentData with the latest or least corrupted PlayerHistory data.
There’s probably an automated way of doing this but I haven’t dealt with player data in literally a decade. Good luck pal.