This is what I’m trying to achieve. For example, if the admin inputs a valid userID in the textbox and then clicks on promote, the player whose ID was inputted would get their “RankIndex.Value” increased by one.
I’ve tried searching for a solution, and I’ve tried to use UpdateAsync/SetAsync. It does update something (used print for debug), but when that player logs on, they have their previous value instead of the new one.
If you are using the player ID as the datastore key (which you should be doing), then you can just getasync on the userid, rewrite whatever data is necessary, and call updateasync
I still haven’t come to a solution. Maybe I’m doing something wrong, but I honestly don’t know what. It’s late rn, so maybe I’ll try to fix in the morning, but I doubt it. I don’t know why it’s not working. Whenever I use updateasync to overwrite data, the player whose data was updated always loads their previous data, completely ignoring the update (if it even worked properly).
alright after playing around some more, I managed to fix it on my own. After I put the data in a table it began to work, so it’s all good now. Thank you for trying to help!