Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is it possible to get a specific value from every single players data storage ?

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

2 comments

0

its possible but it's hard

0

you could change their async data

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.