Lobby data transfer not working

I have a system for player hosted lobbies, but I can’t get the lobby settings to transfer to a reserved server. I’m not using MessagingService because it has an unsolvable edge case and I’m not sending the settings via the teleport data in :TeleportToPrivateServer() because it can be modified by exploiters.

The code below aren’t the full scripts, everything other than these parts function perfectly.

Main (start place) server:

local data = {
	generationSeed = generationSeed,
	starCount = starCount,
	clusterSize = clusterSize
}

local server = teleportService:ReserveServer(94254084317259)

lobbyDataTransfer:SetAsync(server, httpService:JSONEncode({serverId=server, data=data}), 120)
teleportService:TeleportToPrivateServer(94254084317259, server, players)

Lobby (reserved) server:

game.Players.PlayerAdded:Wait()

local memoryStore = game:GetService("MemoryStoreService")
local lobbyDataTransfer = memoryStore:GetHashMap("LobbyDataTransfer")

local httpService = game:GetService("HttpService")

local rawData
local dataLoaded = game.ReplicatedStorage.DataLoaded

local tries = 3
repeat
	task.wait(1)
	tries -= 1
	rawData = lobbyDataTransfer:GetAsync(game.PrivateServerId)
until rawData or tries <= 0

Hello, from my research, Player:GetJoinData() receives teleportData only from teleports that are sent by the server, meaning that client modification would be impossible theoretically (unless the exploiter has server access, which in that case they’d have control of the entire game anyway). Just make sure if you have third party teleports enabled to check the SourcePlaceId to make sure the player was teleported from a related place.

It works, but I’m still not entirely sure if its secure because of what the docs say.

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