As the title suggests, im confused on how to go about changing a value in a dictionary and im not sure if i can just do
data = store:GetAsync(plr.UserId)
data.Owner = "Bob"
or if i have to do some other complicated method.
As the title suggests, im confused on how to go about changing a value in a dictionary and im not sure if i can just do
data = store:GetAsync(plr.UserId)
data.Owner = "Bob"
or if i have to do some other complicated method.
Your code is actually correct so far, although you aren't saving the datastore after changing the value. To save this value, we use the DataStore.SetAsync method. In your situation, it would be used like so...
local Data = store:GetAsync(plr.UserId)
Data.Owner = "Bob"
store:SetAsync(plr.UserId, Data)
Hope this helped! (please mark as answered if it did)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
this makes this so much easier thank you