Help on resetting game data

I want to achieve the goal of having all game data reset, right now I am so fast for my speed simulator cause I messed up the legitimate leaderboard amounts I had somehow at one point. I am so fast, I fly off the map. Ive tried to take out the savedata script entirely but the data just went back to how it was before. Anyone have ideas on how I can reset game data?

Have you tried removing your data from the DataStore? You can run something like this in the command line: your_datastore:RemoveAsync(your_user_id).

Also, I believe this should be in #help-and-feedback:scripting-support.

This works, yes, but if you want to remove everyone’s data then change the datastore name

1 Like

Where can I find this datastore? Is it just the script storing the data?

There should be something like the following code example in your data script:

DataStoreService:GetDataStore("Datastore name")

Change the string inside of it.
Note: You can always change it back if you want to recover the lost save data.

1 Like

This is what the script looks like

local ds = game:GetService(“DataStoreService”):GetDataStore(“savedata”)
game.Players.PlayerAdded:Connect(function(plr)
wait()
local plrkey = “id_”…plr.userId
local save1 = plr.leaderstats.Speed
local save2 = plr.leaderstats.Rebirths

local GetSaved = ds:GetAsync(plrkey)
if GetSaved then
	save1.Value = GetSaved[1]
	save2.Value = GetSaved[2]
else
	local NumberforSaving = {save1.Value, save2.Value}
	ds:GetAsync(plrkey, NumberforSaving)
end

end)

game.Players.PlayerRemoving:Connect(function(plr)
ds:SetAsync(“id_”…plr.userId, {plr.leaderstats.Speed.Value, plr.leaderstats.Rebirths.Value})
end)

So just change the end quotes to anything?

Here it is! ////// Change the “savedata” string to something else

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.