How do I make a server wide value?

Hello! I want to make a number value that throughout all the servers is the same. For example, if in one server the value changes, all server’s value changes. I have searched around and found possible that “Messaging Service” would be what I want to use but I’m very confused on how I would use it for my situation.

1 Like

it would have to be some value saved through datastores probably and you just change the datastore through a plugin or something

What do you mean through a plugin?

If you gave some details about your situation, we can help you find a more specific solution!

Here’s a great article on how to use MessagingService, it’s a very fast communication between all servers. It’s the best option for the most live count.

If it’s a value you want to save when no one’s playing & continue when players join you can use MemoryStore. It’s like DataStore but data expires after 45 days if not used & is a smaller scale but faster storage than DataStore.
https://developer.roblox.com/en-us/articles/memory-store

However if you wish for said value to be stored long term & not losing it, using an actual DataStorage is recommended, although not as fast as MemoryStore.

You can take use of all 3 at once, depending on your needs.