Hello,
I am trying to learn how to use Memory Store, I am having trouble figuring out how to use SetAsync() and the other fuctions. If someone could explain to me how to use them that would be amazing!
My Script at the moment:
game.Players.PlayerAdded:Connect(function(plr)
local MemoryService = game:GetService("MemoryStoreService")
local SecretsHatched = MemoryService:GetSortedMap("SecretHatches")
local Secrets = plr:WaitForChild("Secrets")
--Secrets
local UniThing = SecretsHatched:SetAsync(?????)
Basically SortedMaps function like regular DataStores, except they have a storage and time limit. When using the functions SetAsync() and UpdateAsync(), it requires a key and value perimeter, similar to DataStores, as well as a final expiration perimeter, which is basically when the data removes itself (in seconds). GetAsync() and RemoveAsync() is the exact same as DataStores, which only requires a key.
Well, this depends on how active your game is. In your scenario I would suggest just setting it to maximum (30 days or 2,592,000s) unless you really need it to be removed earlier to clear space.