Teleport system

Is it possible to transfer data from different servers via Messaging Service? I want to make a teleportation system from different servers, for example, Player A on server 1 sends a request, and Player B on server 2 receives a request and teleports to Player A

MemoryStores would suit that far better Memory stores | Documentation - Roblox Creator Hub
MessangingService also would not really work becouse server you are teleporting players to could not exist and more so you wont even be able to predict server’s jobid

I believe what op meant, was that player A sends a request to the server a, server b receives, and if there exists player b, then player b should teleport to player a.
So the server would probably exist, and if not. Then it wouldn’t matter.
And, if the player doesn’t exist, then again it wont matter. Can’t teleport nothing.

In this case, yes. You can add in data to messaging service (2nd parameter). And send in the player userid or something.

What if that a reserved server?
Then you can do nothing about it.
Anyway you should use memory stores for that becouse its their intended use

you can still send the server a jobid, then send it using the second parameter?
Im not sure what you’re mean

yes its possible

you can read about it here: Cross-server messaging | Documentation - Roblox Creator Hub
and here: MessagingService | Documentation - Roblox Creator Hub

there is even a example on the first link

local MessagingService = game:GetService("MessagingService")

local function OnMessage(message)
	print(message.Data)
end

local topic = "TeleportServerEvent"

-- Subscribe to the topic
local subscribeSuccess, subscribeConnection = pcall(MessagingService.SubscribeAsync, MessagingService, topic, OnMessage)
if subscribeSuccess == false then error("Failed to subscribe to " .. topic) end

task.wait(10)

-- send data to other servers
MessagingService:PublishAsync(topic, "Please teleport player 12345")

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