TeleportData not being received when teleporting to a reserved server of the same place

I have a game where I made it’s framework able to run either the lobby system OR the actual game, however, when I use TeleportService:TeleportAsync() to teleport players to a reserved server, I never actually get the data I sent in the TeleportOptions that was within the TeleportAsync call.

I create a TeleportOptions, and then teleport the player(s) to a fresh reserved server, and I teleport just fine

local TPOptions = Instance.new("TeleportOptions")

TPOptions:SetTeleportData(Settings)	
TPOptions.ShouldReserveServer = true
		
TPS:TeleportAsync(game.PlaceId, plrs, TPOptions)

In the reserved server I then check for the data inside a PlayerAdded event

game.Players.PlayerAdded:Connect(function(plr)
    local PlrData = plr:GetJoinData()
    print(PlrData)
end)

it however, always prints nil, I’ve tried using TeleportService:GetLocalPlayerTeleportData()(yes on the client), however that also returns nil. I made sure the table I send isn’t mixed keys, it’s just a couple bools and a couple numbers, all with string indexes, I tried keeping the original server alive using a game:BindToClose to see if it was just because the server shutdown too fast, and that did nothing.

Yes I’ve been testing in a live server, not a studio server / local server

Is there something I’m missing? or does TeleportData just not transfer if it’s a teleport to the same place?

1 Like

Try looking at this code.

local Players = game:GetService(“Players”)

local function onPlayerAdded(player)
local joinData = player:GetJoinData()
local teleportData = joinData.TeleportData
local randomNumber = teleportData.randomNumber

print(player.Name .. "joined with the number" .. randomNumber)

end

Players.PlayerAdded:Connect(onPlayerAdded

Looks like you missing:

teleportData = plrData.Settings
Variablename = teleportData.variable

Or try
teleportData = plrData.TeleportData
Variablename = teleportData.variable

Hope this helps. Here is a link to help:

Trying this out for myself right now too. Hope i helped