So, i was recently trying to create a lobby for my game but it turns out that i can’t teleport multiple people using the TeleportPartyAsync function. It does work for only 1 person but when i try multiple people it doesn’t work.
I’ve tried to look on the devforum where i did find some posts but those solutions didnt work for me.
This is the code I use:
--
function playertable()
local t = {}
for i,v in pairs(playersfolder:GetChildren()) do
local plr = game.Players:FindFirstChild(v.Name)
if plr then
table.insert(t, plr)
end
end
return t
end
--there is more code here but since it doesnt have anything to do with teleporting i feel like this is enough
tp:TeleportPartyAsync(gameid, playertable())
Also, no the game isn’t private, neither is the place i’m trying to teleport the players to.
Yep, and actually, I first noticed my teleportservice problem about 5 to 7 days ago, but figured it was something I didn’t understand /script properly. Now, after spending much of this weekend of trying to get a simple group teleport to work, I’m starting to think maybe it’s not my fault. The syntax seems rather straightfoward. I would even have called it a simple thing – a basic teleportation to another placeId – even though I hadn’t tried using TeleportService before this month.
It’s really puzzling to consider this an engine issue. If it started a week ago, shouldn’t it be wreaking havoc across the platform? Or do bugs have a kind of roll out period as well? I’m not a noob anymore but I am still a rookie so idk.
This solution is less viable, but this teleports everybody one at a time
for i,v in playersfolder:GetChildren() do
local player = game.Players[v.Name]
if not player then continue end
game:GetService("TeleportService"):TeleportAsync(gameid, {player})
end
That would certainly get everyone out of the game and on their way to elsewhere, but would it put them on the same server instance of the new placeID? I think that the group /playerlist method of moving players in the same teleportation is the only way to guarantee that everyone goes somewhere all together, but I could be wrong about that.
I’m rather inexperienced, but I encountered this teleport problem because, while my single player teleportation code was working fine, I seem to recall that sometimes it had 2 players arriving alone in/at different server instances of the same placeID.
I need a group to go together. And so I had to give up on the idea of having a lobby after finding that I just can’t seem to get TeleportService to work in that manner.