TeleportPartyAsync won't send teleportData, but TeleportToReservedServer does

I am trying to send TeleportData to a destination place, the problem is that the data isn’t being sent when TeleportPartyAsync is used, it simply returns nil.

The following example works as expected:

TeleportService:TeleportToPrivateServer(self.PlaceId, code, self.Players , "" , {PlayerCount = #self.Players; Gamemode = self.Gamemode; Deckmode = self.Deckmode; Map = self.Map})

I can call Player:GetJoinData() and access the player’s teleportData as usual. The problem comes when I try to teleport the player back to the place they came from in this manner:

task.spawn(function()
				local teleportOptions = Instance.new("TeleportOptions")
				teleportOptions:SetTeleportData({OrbCount = 20})
				repeat
					local success , err = pcall(TeleportService.TeleportPartyAsync,TeleportService,5791549254,Players:GetPlayers() , teleportOptions)
					if not success then print(err) end
					task.wait(1)
				until success
			end)

The teleport is successful but if I try to print Player:GetJoinData().TeleportData I get nil.
I tried simply using a dictionary instead of a teleportOptions instance and got the same result.
Does the teleportOptions instance need to be parented to something in order to work properly?

I tried parenting the instance to ServerScriptService and nothing changed.

1 Like

To anyone who has this issue in the future, just use TeleportAsync instead of TeleportPartyAsync, this solved my problem.