So lets say that every single player has a variable in their data storage called cash is there a way to get every single players cash value and add them together into a new value? I need this because I want it to be harder to get cash depending on how much cash there is in total like in the whole game not just in the server
COMMUNITY QUESTION
Is it possible to get a specific value from every single players data storage ?
1 answer
You would need to loop through each player, and then add their value to an existing variable outside the loop scope. Simple rundown being:
local amount = 0
for i,v in next, Players:GetPlayers() do
amount += v.Cash.Value
end
1 comment
0
You clearly didn't read the post. I want every single players cash even if they are not in the game via their data storage
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
its possible but it's hard
you could change their async data