Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Request was throttled? Help please? [SOLVED MYSELF]

So, I have a clicker clicking at 0.1s speed and a datastore is saving a value, but after about 20 clicks it starts coming up with an error and stops saving the value. Help please?

function newData(statType,startingAmt,datastore,Name,Parent,player)
	local test = Instance.new(statType,Parent)
	test.Name = Name
	test.Value = datastore:GetAsync(player.UserId) or startingAmt
	datastore:SetAsync(player.UserId, test.Value)
	test.Changed:Connect(function()
		datastore:SetAsync(player.UserId, test.Value)
	end)

	game.Players.PlayerRemoving:Connect(function(player)
		datastore:SetAsync(player.UserId, player.stats[Name].Value)
	end)
end

1 comment

2

This is because you are sending too many requests to the datastore server. This is to prevent the data store server from crashing due to too many requests..

2 answers

I figured it out myself.

I moved the PlayerRemoving function to the end of the script and switched the datastores to the datastores that are being saved.

Same with the Value of what i'm saving.

This discussion is preserved as it was. New answers, comments, and votes are closed.