I have this script which I run in run command in studio:
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetDataStore("Quacks")
local suc,err = pcall(function()
DS:RemoveAsync(--Player's UserId)
end)
if err then
console.warn(err)
end
if suc then
print("Removed")
end
What it does when run is remove a single player's datastore. How do I make it so this script erase the entire datastore of a game for all players?

5 comments
or you could just set all of the player's values to 0 then save the data
or make a new data store.
Setting all the player's values to 0 isn't the correct way to erase or reset a datastore
just change the text inside the parenthesis ':GetDataStore("Quacks")'
changing it will create a brand new datastore if a datastore hasn't already been used with that name in your game