Hello, so recently I have been wanting to add a Daily Reward System to my game but when I looked up some guides and tutorials they all use Datastore. But my game runs solely on Datastore2 so if I were to use both Datastore and Datastore2 an error would occur which says “Datastore has been added to queue…”.
How would I go about making a system that uses datastore2?
Datastore2 also uses datastore so I don’t think it will really matter, just change the code, first of all you have to keep some kind of value to say that when the player has collected the reward, if they didn’t collect the reward the next day, reset it to first day reward
But whenever I have both Datastore and Datastore2 running in my game the warning will always pop up no matter what. Plus, I have noticed that most of them are using SetAsync to save but I am only familar with saving values that exist eg. Bools, Ints…
The thing is that SetAsync sometimes errors and resets data, you can save the previous reward’s date
local datastore2 -- datastore2 location here
game.Players.PlayerAdded:Connect(function(player)
local rewardDataStore = datastore2("DailyReward", player)
-- Check when the player has collected the reward using os.time()
-- I personally forgot how to use datastore2 because I don't work with datastores that much
-- But save the time when the player collected the reward, like a remote event
-- Save it in datastore2 as os.time() when the player collects it
-- I never made daily rewards in my entire life
end)