I can't figure out what is wrong with my DataStore. It Doesn't print saved, and sometimes it says "13:42:40.515 - DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 287423167" in the output. Please help!
Code:
game.Players.PlayerAdded:connect(function(player)
wait(10)
local DataStore = game:GetService("DataStoreService")
local leader = Instance.new("Folder",player)
leader.Name = "leaderstats"
local LevelData = DataStore:GetDataStore("Level")
local level = Instance.new("NumberValue",leader)
level.Name = "Level"
level.Value = LevelData:GetAsync(player.UserId) or 1
local EquipedData = DataStore:GetDataStore("SkinEquiped")
local skinEquiped = Instance.new("StringValue",player)
skinEquiped.Name = "SkinEquiped"
skinEquiped.Value = EquipedData:GetAsync(player.UserId) or ""
end)
game.Players.PlayerRemoving:Connect(function(player)
local DataStore = game:GetService("DataStoreService")
local LevelData = DataStore:GetDataStore("Level")
LevelData:SetAsync(player.UserId, player.leaderstats.Level.Value)
local SkinData = DataStore:GetDataStore("Level")
SkinData:SetAsync(player.UserId, player.SkinEquiped.Value)
print("Saved")
end)

2 comments
That message you got just means that you are sending too many requests for ROBLOX to handle and is not actually an error until you spam it.
ok thanks, but that doesn't really effect me