TeleportAsync not respecting TeleportOptions

I’m trying to use the TeleportService:TeleportAsync() function to send the player to a reserved server with some data.

local teleportOptions = Instance.new("TeleportOptions")
teleportOptions.ShouldReserveServer = true

teleportOptions:SetTeleportData({
	key = "Value",
})

TeleportService:TeleportAsync(game.PlaceId, { player }, teleportOptions)
local joinData = player:GetJoinData()
if joinData then
	warn("Join data exists!")
else
	warn("No join data!")
end

if joinData and joinData.TeleportData then
	warn(joinData.TeleportData.key)
else
	warn("No teleport data!")
end

However it seems that in most cases the player does not get sent to a reserved server and instead just back to the server they were originally in (old logs are seen in the console). And whether or not the player does get to a reserved server, there is never any teleport data.

Oddly enough there were 2 times, out of roughly 50 iterations when it seemed to work consistently but every single time I tried to go back I could never get it to work again.

Should these 2 code blocks not always create a unique new server and send the data with the player? Have I misunderstood or overlooked something?

It’s client ?

I looking on documentation, it’s store on client

GetTeleportSetting (client thing)

Turns out the problem was not related to the teleportation logic itself, that is fine, but rather a different part of the code.

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