TeleportPartyAsync Error

Teleport Error with “TeleportPartyAsync()”
Hello there! I am trying to create a teleport system where a party gets teleported after they have been in a certain area for a period of time. Since I used “TeleportPartyAsync()” I went to test it in game, and was met with the following error:

Screenshot 2025-03-07 225038

This was the code used:

--ts is equal to the teleportservice
--teleporttable is the table of players that was already defined
--chapterid is the place id
for i, v in pairs(playersIn:GetChildren()) do --platersIn is the folder with the player values in it.
	local hasValue = pcall(function()
		local value = v.Value
	end)

	if hasValue then
		local nameFind = v.Value.Name
		local playerActual = game.Players:FindFirstChild(nameFind)
							
		table.insert(playersTeleportTable, playerActual)

		v:Destroy()
	end
end

print(playersTeleportTable)

ts:TeleportPartyAsync(chapterId, playersTeleportTable, ts:GetLocalPlayerTeleportData())

What I’m taking from this is that there is a certain setting enabled that prevents me and anyone else from being teleported to the place, which is in-game by the way. If anyone can help, I would appreciate it. Thank you!

Make sure you’ve published the place and that it’s public.

If that’s already done, then check to see if you filled out the experience questionnaire

1 Like

Hes right publish the place you are sending the players to and in security settings turn on Allow third party teleports that might not be the real name but it’s in security settings

i think you only need Allow third party teleports when you teleport from your own experience to other experience that does not own by you.

in case the OP is just teleporting to another place within the same experience, we shall not enable the third party to minimize unwanted teleports.

Handle failed teleports
you shall implement the handle failed teleports, i think the principle is the same even for Teleporting a party

Hello,

Let’s break down what could cause these issues and what you need to do to debug the issue even more, or fix the issue.

Here are a few solutions you could try!

Check the destination Place’s access settings.
Ensure that the destination experience allows players to be teleported to it. If it’s a private server, make sure that the players you’re teleporting have permissions to join that server or that the server is open to the public.

Use correct Teleport Data:

The error could be related to the teleport data. Instead of using ts:GetLocalPlayerTeleportData(), you can try using teleport data specific to each player or omit it entirely if unnecessary.
Ensure the teleport data is set correctly and matches the expectations of TeleportPartyAsync().

Local Player Data:
You’re using ts:GetLocalPlayerTeleportData(), which works for local player teleportation. If you’re teleporting a party of players, the data for each player may need to be set up properly or handled in a different way.

Here’s how you can modify your code:

-- I didn't change anything to your code really, I added something you could try out.

-- Teleport the party
local teleportData = {}
for _, player in pairs(playersTeleportTable) do
table.insert(teleportData, ts:GetPlayerTeleportData(player))
end

ts:TeleportPartyAsync(chapterId, playersTeleportTable, teleportData)

How would I change the place to be set to where people can teleport to it? I’m looking and can’t see it anywhere.

Ah, it turns out I just had to reserve a place for the players to be teleported to, then teleport them using “TeleportToPrivateServer()”

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