Share value across servers

So, I have been trying to figure out a way to share the same IntVaule across multiple servers. What I mean by this is I want a number to increase by 1 every second in a Intvaule and have it display the same number on a Screen Gui in all servers. Is this in any way possible?


it is but i don’t thing work every one seconds, u can use MessagingService, u can use this link:

1 Like

You must use datastore for that.

1 Like

Hello there,
To do that, you should use MessagingService.

Here is an exemple of how you could do that :

  • When a server is created, use PublishAsync to get the current number in each server ( just use one value since it will return all server values :joy:.
  • When you got it, just store it in a variable, but also store tick() value when you received the number of a server.
  • When a player in joining, fire a RemoteEvent to the client like this (Remote:FireClient(plr, number + tick()- tickValue)
  • In the client script, just listen for OnClientEvent Event and do just after receiving the value while wait(1) do to increment the number Value by one.

Hope it helped and also hope it was clear enought since i’m French.
Good Luck.