Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
3

How do I reset datastores?

Asked by
mxpvjn 75
8 years ago

I want to reset the data stores for my game. Is there any way to do this without changing the name of the data store or making a new game?

0
If you REALLY just want to reset them instead of simply renaming them, you'll have to write a script that goes through everything 1 by 1 and removes everything. Otherwise, go with eLunate's answer. RiftTalon 98 — 8y
0
You're trying to give him false hope. Roblox doesn't allow you to aggregate datastore keys - There's no way to do that. User#6546 35 — 8y
0
There's a function called RemoveAsync() so try that. Dalbertjdplayz 37 — 5y

1 answer

Log in to vote
4
Answered by 8 years ago

You don't.

When you want to reset data, you don't delete the old data - You just don't load it. This either means changing the name of the datastore, or changing how you generate the keys: If you're generating the keys based such as "user_" .. Player.UserId, then resetting all player data is simple as changing user_ to something else.

This is an unfortunate limitation in how Roblox handles datastores, however there is not a better way to manage this as Roblox only exposes an in-game API and expects persistence for the foreseeable future; They also expect you to use a testing database for testing, or to not enable Studio API access.

0
kid stfu 3_Ii 13 — 5y
0
LMFAO ^ greatneil80 2647 — 5y
0
Then roblox is wasting server space asadefa 55 — 5y
Ad

Answer this question