I am making a game and i want to give every player 100$ at the end of every round and then have the game save that amount for incase they decide to leave and come back later but data stores have become confusing to me could someone please help me out here
✓ ANSWER ACCEPTED
DataStores Help ?
1 answer
✓ Accepted answer
The following should give you a good example to follow:
local DSS = game:GetService("DataStoreService")
local plrDS = DSS:GetDataStore("PlayerValues")
function saveData(plr)
plrDS:SetAsync(plr.userId .. "_key", plr.Cash.Value)
end
1 comment
0
thanks i think this should be enough help
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
can you give us some example code to how you think it could be done? So we know you're not being lazy and asking for a code.