Please just delete this stuff yourself Roblox if it is so important, it is not pleasant getting these messages non-stop. I would gladly consent to having user data auto-deleted instead of getting these messages.
1. local ServerStorage = game:GetService(“ServerStorage”)
2. local DataStoreService = game:GetService(“DataStoreService”)
3. local removePlayerDataEvent = ServerStorage:WaitForChild(“RemovePlayerData”)
* – Reference to player data store (replace “PlayerData” with the name of your data store)
4. local playerData = DataStoreService:GetDataStore(“PlayerData”)
Data = DataStore:GetAsync(Player.UserId)
print(Data) -- I suggest you use a pcall for this.
* local function onRemovePlayerDataEvent(userID)
5. – Pattern for data store player key, for instance “Player_12345678”
6. local dataStoreKey = “Player_” … userID
* local success, err = pcall(function()
7. return playerData:RemoveAsync(dataStoreKey)
9. if success then
10. warn(“Removed player data for user ID '” … userID … “’”)
Your key is your UserId (In most cases for people), when people create a DataStore they use Players UserId’s because in any case they never change unlike usernames which can change if you pay 2,000 robux to change your username.
Yes you have, lol.
local playerData = DataStoreService:GetDataStore(“PlayerData”)
Everytime this piece of code runs it creates a DataStore or finds a Datastore( If it already ran before).
You only need to clear your data stores if you have used them before. If you have never used data stores before, there will be no data saved for the said user, so you dont need to worry about it. If you have used data stores before, you need to look at the specific data store name and key where your code saves the data and remove it from there. There is no general data store where all data is saved. If you have never used data stores before, then you probably have know idea what I am talking about and you dont need to take any action. If you have used data stores, then you probably already know how it works and what to do.
Edit: If you have other scripters or use free models, check to make sure they dont have scripts that use data stores.
If you have no idea if your game even uses datastores or if it does but you don’t know how the script works, then you would have no way to erase a user’s data. The script(in your game) that saves the data creates the key, you have to know how it is created in order to delete it.
Its like @Rymazon says, if you don’t have any data, you have nothing to erase, consider it done and delete the message. They probably just blindly send these to every game the person ever joined whether it had data or not.
They have to send you a message, plenty of games store other information about the player rather than just datastores, so it’s extremely important you do it yourself.
I have a dumb idea though, maybe they could make an API event that you connect to or something similar that will call a function you created, which could automate that entire process for you and solve the issue that large games can’t keep up