I am trying to create a system where players get sent to a boss fight in a separate place within the main place and after they win they get sent back to the main game but is there any sort of way to carry a message along with the teleport back to tell the server to reward them in the main game or should I just reward them in the separate place under the main game after they win?
I’ve tried looking up tutorials but they don’t seem to have what I need or I might’ve missed parts that would’ve been important to me.
If you want you can use a RemoteEvent inside of ReplicatedStorage where you can FireAllClients from the seperate game, then i recieve it from the client and then do FireServer from the client to the main game to add cash.
This is an efficient way to use events and connect between 2 different server scripts.
So if a player were to win would messaging service send a message to every single open server in the main game and then the receiving script in the main game of every open server would have to wait a couple seconds then check if the player has joined after being sent by teleport service to there after winning?
I’m planning for it to show the player a GUI in the main game after being sent from the boss place to the main experience and I don’t know if this way would be reliable?
Is there no way to send a message along with the teleport service towards the server they’re being sent to instead of messaging service sending a message to every single open main server checking if that’s the one they were sent to?
I was able to get it to work by instead of using MessageService I used TeleportService where I then used the Teleport() function that has a parameter called "teleportData’ that allowed me to bring a message along with the teleport to the original experience so I can let the main experience know if they won and if they did which difficulty.