Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I want to use teleport party async to teleport players to different servers, this doesnt work?

local players = {}
local player = game.Players:GetPlayerFromCharacter(v)
for i, lol in pairs(workspace.Bus.Players:GetChildren()) do
	table.insert(players, player)
end
game.Players.PlayerRemoving:Connect(function(p)
	for i, k in pairs(players) do
		if p.Name == k then
			table.remove(players, i)
                        end
                    end
                end)
game:GetService("TeleportService"):TeleportPartyAsync(GameID, players)

Output Error: TeleportService:TeleportPartyAsync error: The player[UserID] with wrong session.

1 answer

for i, lol in pairs(workspace.Bus.Players:GetChildren()) do

I think the "lol" and "Bus" seem out of place

1 comment

0

@Destructor57890 I did some editing and I removed the for i, lol in pairs() because I was already doing for i, v in pairs() but it still didn't fix it. The output error however is "TeleportService:TeleportPartyAsync error: The player[977825575] with wrong session."

This discussion is preserved as it was. New answers, comments, and votes are closed.