Where is the best to save constantly changing values, and how can I?

I’m making a nation game. So I need to save many data,
for example: Treasury, Population, Stability

These values should be changed constantly, calculated by server.
And I want these values to be checked in the client.

+There is also a troop training system in it, so it needs to save data such as deploy location, training progress.

AI says it’s the best way to save it in server memory and to send it to clients with remoteEvent when they need it.

I used to save these values in replicatedStorage, in form of value instances by now.
So what is the best way to do this? Please advise!

Both options seem good, but I believe you would need to make folder for each player containing the data. If you don’t want exploiters see the values of other players I would recommend remotes.

1 Like

I’ve been in your shoes before, and what I’ve been using is what the AI suggested to you: saving data in the server memory. It definitely takes up less memory than many values in rep storage, and it is easy to access and work with.

2 Likes

On second thought, I figured out that sending a few numbers to a client via remote event isn’t that expensive, even if I send one per second.

can’t give each of you all a solution mark, but I liked both though. thank you !

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.