Why is added to queue DataStoreService not working?
code:
01 | local DSS = game:GetService( "DataStoreService" ) |
02 | local DS = DSS:GetDataStore( "Coins" ) |
04 | game.Players.PlayerAdded:Connect( function (player) |
05 | local ls = Instance.new( "Folder" ) |
06 | ls.Name = ( "leaderstats" ) |
09 | local pts = Instance.new( "IntValue" ) |
10 | pts.Name = ( "Rebirths" ) |
14 | local Coins = Instance.new( "IntValue" ) |
15 | Coins.Name = ( "Coins" ) |
17 | Coins.Value = DS:GetAsync(player.UserId) or 0 |
22 | game.Players.PlayerRemoving:Connect( function (player) |
23 | DS:SetAsync(player.UserId, player.leaderstats.Coins.Value) |
error: DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key