How to achieve and store "Global Values"?

Hello Devs I have been wondering how I am able to achieve “Global Values” I dont really know how to name or explain it but I will show example here:

What do I mean is the Total Hatched Value.

image

(This image is taken in Rumble Studios Discord server)

Thanks for any ideas how would I go about it since I have no clue.

You can just save the global value in a datastore in a specific key or you can have an external datastore that stores the value and is updated using httpservice when you want it to be updated.

1 Like

Okay so I will create basically datastore without player userid key in it and I will access this value similiar how I can for player?

player.leaderstats.Coins.Value --player
game.leaderstats.Coins.Value --global? 

Yes you can use any unique key to store the value in a datastore,

DataStore:GetAsync("GlobalCoinKey")

DataStore:SetAsync("GlobalCoinKey",CoinValue)

But you have to be careful of how many times you write and access this key because there are time limitations.

Alright thank you so much I am marking your post as a solution so other people can see it.
Have a great day :wink:!

1 Like