How do I make cross-server communication without listening to event?

I check out the messaging service, but the server needs to listen to an event for it to work. I want to approach this by using one while loop that changes all server events.
For example, this could be the day and night system that have the same time in all server.

You have to be listening to the event. There is no other way to use MessagingService. You push out a message, and all servers listening to it get it.

1 Like

Yeah, I know that, I am just asking is there a way to do it. I am thinking of having the first active server a host server, and that server control and sending the communication.

1 Like

The only way to make direct server-server communication is using MessagingService.

1 Like

well i was looking for this anyway can you give as an example of how to listen to the events and cross-server communication?

Well actually, there happens to be another good way.

Bindable Events! They work very similarly to Remote Events, and they’re for client-to-client, or server-to-server communication.

Here’s the Roblox API link: BindableEvent | Documentation - Roblox Creator Hub

Where does it say on the Roblox API that Bindable Events can be used for server-server communication?

Like Server1 to Server2 not Server1 to Server1

“Allows events defined in one script to be subscribed to by another script.”

I wish they’d be more clear about what it can do on the API, but this is how it works.

By another script in the same server not cross-server…

1 Like

Oh jeez! I misread the post and replies as server-to-server script communication, not game servers haha… sorry!

But on that subject, there are two other alternatives you could use. Firstly, DataStoreService, though it’d likely be slower and quite limited. And secondly, HttpService, which of course is more finicky and more complicated to use for what OP is trying to do.

So yes, MessagingService would be OP’s best bet.

You can use messaging service to communicate with other servers about which server is the host. You can determine the host for example by which server has been online the longest. Then when a new server is made, it will post to messaging service asking if there is an existing server. If there is, it will listen to messages from that server, if there isn’t it will take the position of the host server. You will also need to make the servers announce when they go offline, so that another server can take host position.

Well when universe scripts come out you won’t be needing to use messaging service. Right now you could use messaging service which is a better idea then using an external server.

Also datastores aren’t for communication between servers, that’s what real time databases are best at.