How to send information between places when a player is teleporting to it

Alright, Im going straight to the point. Is there a way to send information between 2 places in a game.
For example, I have game with places named A, B and C and A is the start place. Let’s say 2 players had teleported from A to B and C respectively and when they had teleport back to A, I want players from C to spawn in a location different from B.

Straighter forward explanation: How do I sent information like which places they are teleporting from when they are teleporting back to A.

Appreciate any help on the topic.

1 Like

Take a look here:

Its rather hard to understand, are there any other simpler sources. Also i do have questions. How do i know which server to send the message to as teleportservice teleports you to random servers in the places

MessagingService

That not usefull to use because you have a limit.
@Chimmy_Coder try to use DataStore maybe instead of MessagingService because limite is not usefull.

1 Like

I made a network module that handles that. When you teleport a player, there’s a method called GetPlayerPlaceInstanceAsync() where you can get the JobId of the server the player was teleported to. Since you now have that, you can directly address the server the players went to by including the JobId in the message. The server knows what it’s own JobId is, so it’s a simple matter to determine if the message is for the server or not.

@hollaquetalBRUH I had problems using that. The datastore is slow compared to MessagingService. Unless you also include the JobId of the server the player was teleported to, there will be no way to know who the data is for. This becomes especially important when there are multiple instances of the game running on different servers.

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