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
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