Resetting certain players stats / datasave

Hey developers,
I own a tycoon game with a current flow of players of 100+ and this issue is heavily impacting my player count due to taking out the challenge of what keeps players entertained.

I didn’t notice this till a few days after it happened and I permanently banned the user from the experience, Is there any way I can reset his specific stat without resetting any others?
image

Thank you!

Add a new script to Studio.

Just do what you would normally do when saving data and change player.UserId to his specific id.

Set his data to 0

Click Run

His data should be reset

and boom!

example:

local success, errorMessage = pcall(function()
	experienceStore:SetAsync([his userid], 0)
end)

my database is stored like this


in a modulescript would it still work?

call the module, do what you would normally do, but when using SetAsync, make sure the key is their username/userid --whichever you are using.

just do this inside of console:

local datastore = game:GetService("DataStoreService"):GetDataStore("Datastore Name")
local userid = 3362212863 --his userid (yes, it is his)

datastore:RemoveAsync(userid)

It can also work with ordered datastores.

local datastore =  game:GetService("DataStoreService"):GetOrderedDataStore("Datastore Name")
local userid = 3362212863 --his userid (yes, it is his)

datastore:RemoveAsync(userid)
1 Like

You could make it on the leader board so that if they are on the banned datastore it doesn’t add them. That way it solves future problems like this

You could just use the datastore editor plugin. Makes things like this super simple