Send Information Between Servers

Note: This is my first post and will suck

The title explains it, I’m trying to create a script that send info between servers but don’t know how to start, I’ve seen other scripts send it between games but not between the same games servers. If that wasn’t clear say there are 2 servers in a game and one person does something I want the other game to print out “Hello World!” Does anyone know how I could approach this? Thanks.

Check out MessagingService, theres lots of stuff on it

2 Likes

These two examples of messagingservice MIGHT work, I haven’t tested them out, let me know if they work.

Subscribing:

local msgService = game:GetService("MessagingService")
local subscribe = msgService:SubscribeAsync("DoAction", function(msg)
	print(msg.Data.text)
end)

Publishing:

local msgService = game:GetService("MessagingService")
msgService:PublishAsync("DoAction", {text = "Hello world"})
1 Like

I don’t know why im replying but I would just test them, tbh I don’t really use messagingservice. I don’t want to message anyone.

This tutorial may be useful provided by the documentation: Cross-Server Messaging | Documentation - Roblox Creator Hub

Alrihgt, I will try all of these.

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