I’ve made a datastore script for all of my data. The issue is that I removed an Item that I had before. Now, the players who played in the previous version of the game have that data, and so it errors, breaking the datastore script for the entire server.
How can I reset ALL of the datastores, as if a wiped slate? Without creating an entirely new experience and copying it over.
You cant delete a datastore, what @mc7oof is saying is to just create a new one (by just giving it a new name), so everyones data will be wiped since they are not on the old datastore anymore.
If you want to delete people’s data in bulk, without changing where the data is being stored, I would recommend using the DataStore Editor - Roblox on Roblox. Although it costs robux, it saves time having to delete the data individually or having to set a new datastore from scratch. Correct me if it doesn’t delete them all individually, but I wouldn’t see any reason why it couldn’t.
Not sure why you wouldn’t want to create a new datastore though.
You should be versioning the data you save, so that when players with the “old” data type join, you can easily handle converting their old data format into your new data format
Alot of people have surprisingly ignored the fact that you can use a simple method to remove everyone’s data:
local Page = Datastore:ListKeysAsync()
local Pages = Page:GetCurrentPage()
for _, KeyInstance in Pages do
Datastore:RemoveAsync(KeyInstance.KeyName)
end
Roblox also recommends you limit how many datastores you create, so creating a whole new one would be a bad idea.
I mgiht make a tutorial on this since I’m surprised this many people don’t know.