What does this mean?

So I have a ‘skip stage’ script that I use for players to skip a stage in my obby if they would like. However, for some reason the script just stopped working (keep in mind it was working yesterday, I didn’t touch it) and now I keep on getting this error on the dev console:

Any help is appreciated, thanks!

1 Like

You are probably sending too many requests to the datastore

Do you update the datastore key everytime someone passes a stage?

Well I use a datastore to save the player’s stage when they leave the game. The stage value adds 1 every time they touch a new checkpoint

Can you post the code you are using to save the data?

When player touches a checkpoint -

char.Humanoid.Touched:Connect(function(touch)

		if touch.Parent == checkpoints then
			if (tonumber(touch.Name) and tonumber(touch.Name) > tonumber(stage.Value)) or touch.Name == "End" then
				stage.Value = touch.Name

				pcall(function()

					obbyDS:SetAsync(plr.UserId .. "-obbyStageProgress", plr.leaderstats.Stage.Value)
				end)
			end
		end
	end)

Removing -

game.Players.PlayerRemoving:Connect(function(plr)

	pcall(function()

		obbyDS:SetAsync(plr.UserId .. "-obbyStageProgress", plr.leaderstats.Stage.Value)
	end)
end)

The error you are getting mostly happens when you try to save data too much, Documentation - Roblox Creator Hub . In this situation, you should add a debounce to the .Touched function.

1 Like

I’m not necessarily a ‘pro’ at scripting, but is there a way to clear datastore requests?

I am not exactly sure what you mean by “clear datastore requests”, you can just add a debounce to the script to solve the problem. The link I provided before went over the capacity of requests, “Write Requests, Cooldown: 6 seconds between write requests” If you go over the capacity, it will send you the same error you encountered.

Would it look something like this?

if db == false then
	db = true
	wait(6)
	db = false

So I was using another datastore for a donation board I added today in my game, I removed it and realized that the errors were gone and the skip stage button was functioning normally. Does this mean I can’t use multiple datastores?

You can use multiple datastores in a game, you must of made a mistake in setting it up. Could you show the code for the donation board datatstore? Make sure you aren’t making the same or similar mistake as you did with the stages datastore.

It wasn’t my donation board, I was using one that I use in other games I make:
https://www.roblox.com/library/391248083/Donation-Board

Well I guess you could say that this issue is slightly solved.