When I was making a script for the DataStore system for my game, every value there is a Changed function that makes lots of requests to save the progress when the value changes. Every time I do lots of changes I figured out it was the reason the DataStore is saying that there are too many requests and I confiscated the Changed function, what I did to prevent that is the value will only save when the player leaves (PlayerRemoving function). I'm not sure if it will affect the data of the player such as previous data progress will be wiped out accidentally. Did I do anything wrong?
i.e.
money.Changed:Function() --This is the Function I removed, I found out that the 6-second cooldown is already fine but I am having two decisions whether to keep it or remove it moneysystem:SetAsync(player.UserId, money.Value) end)
The other function
game.Players.PlayerRemoving:Connect(function(player) --The function I kept, it now makes less requests moneysystem:SetAsync(player.UserId, player.leaderstats.money.Value) end)