local Save = DataStore:GetDataStore("BoolSave")
game.Players.PlayerAdded:Connect(function(player)
local folder = Instance.new("Folder",player)
folder.Name = "stats"
local bool = Instance.new("BoolValue",folder)
bool.Name = "SavedCar"
local PlayerID = player.UserId
local Data
local success, errormessage = pcall(function()
Data = Save:GetAsync(PlayerID)
end)
if success then
bool.Value = Data
end
end)
game.Players.PlayerRemoving:Connect(function(player)
local PlayerID = player.UserId
local Data = player.leaderstats.SavedCar.Value
local success, errormessage = pcall(function()
Save:SetAsync(PlayerID, Data)
end)
if success then
print("Data saved")
else
print("Error occurred")
warn(errormessage)
end
end)
DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key
This is the entire script? Basically you can only send a certain amount of requests per minute, so that warning is just saying that you sent to many requests in a certain amount of time. Your script looks fine though, sometimes studio doesn’t let you send that many requests, but in the game it should work fine.
You’re editing the data store and then saving it within 6 seconds, this will throw that error. No problems are caused by this, but if you no longer want to see the error message a fix is just to add a wait(6) between the write and save. I’m new to scripting, there’s a more advanced solution than that but I don’t know it yet.
It’s not an error. It’s more of a warning. It means that you’re sending too many requests in a period of time and will put those requests on in a queue and save them later.