I am developing a game that includes every player to have an inventory. I want to save all of the items to one datastore rather than a datastore for each item. Each item has a bool value inside the Player which basically says if the player has that item the bool is true. Saving the dictionary worked but I don’t know how to compare it or test if it changed so I could update the bool for the item. How would I go about this?
Here is an image of what I am trying to accomplish if you’re confused:
This is my code I tested out to save a dictionary to a datastore (Provided by Mew):
local datastore = game:GetService('DataStoreService'):GetDataStore('Arrows', '771417')
local myArrows = { ArrowA = true, ArrowB = true, ArrowC = false }
datastore:SetAsync('test', myArrows)
wait(7)
local test = datastore:GetAsync('test')
print(test)