TLDR-
– the code below makes the teleportation happen but only if there is one player on the server
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local TransporterDisk = script.Parent
local placeID = -- bigger than zero number here
local function TeleportEverybody()
local everyone = Players:GetPlayers()
TeleportService:TeleportAsync(placeID, everyone)
end
TransporterDisk.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
print("teleporter disk got touched yo")
TeleportEverybody()
end
end)
TeleportService:TeleportAsync is not working for me if there is more than 1 player on the server.
If a player leaves the game so that only one person is on the server, then the teleport will work.
I’m passing TeleportAsync (not the old party call) an array (Players:GetPlayers()) but it does nothing if that table has more than one player in it.
I’m really confused because I’m not even using “TeleportPartyAsync”. But if I was, why wouldn’t it support the teleportation of a guest? It seems to contradict the “party” word in the function title. I get that error message when using the TEST tab in Studio.
I simply want to teleport everyone in the game lobby /starter place to a different place in the same published, public experience when a part is touched or a click detector is clicked.
I thought maybe I wasn’t sending an array so I had it print the length of the array before calling the teleport and tested it with 2 players in studio to see what was happening. It printed an array length of 2 before giving me the No guests allowed in the party error.
But I’m not using the party call because the documentation says to just use the all-encompassing “TeleportAsync”. So that’s what I’m using. And it works in the live game, but for one player only.
Fortunately, I have an extra old machine so I can test this live in-game using separate clients.
My starter place is a lobby with a model that is meant to send everyone in the game to a different place (within the same experience) when a part in the model is touched by any player. My teleportation script (which works in-game for one player only for some reason) is a server script parented to a part in the workspace.
It works in the published public game when there is only 1 player in in the lobby/starter place. When the lone player touches the part, the teleportation to the specified different place (within the same experience) happens.
I tested this in a published public game and it teleported me to the other place as I expected, so I thought my test was a success and it was all good to go.
However, it failed when playing the live game with a friend.
It seems that when there are two players in the game /lobby, then nothing happens no matter who touches the part. No teleportation occurs at all.
In Studio, during Play Solo, when I touch the part meant to move everyone, I get the “raiseTeleportInitFailedEvent: Teleport failed because Cannot Teleport in the Roblox Studio. (Failure)” and “… exception while signaling: Cannot Teleport in the Roblox Studio” errors as expected.
When I use the TEST tab in Studio with 2 players, I get the error in the title of this post - “TeleportPartyAsync error: Doesn’t support a guest.” when I touch the part.
Weird because I’m not using the old TeleportParty in my script.
I’m using TeleportAsync on TeleportService and passing it a table - Players:GetPlayers().
I must be doing something wrong, but I just can’t figure out what it is.
Why does the teleport happen with only one player?
Instead of a touched part I put a click detector in a part and got the same results. These are server scripts in the workplace calling teleport service, and it will move a lone player to the new place, so I can’t be mistakenly trying to teleport from the client. I don’t think it is a touching issue because the click detector works as well (but only with 1 player on the server) I turned on 3rd party teleports but that shouldn’t matter because I’m teleporting to different places within the experience.
I need some different eyes on this, please. After more than 5 hours of troubleshooting and testing I am at a total loss. I just can’t seem to create the most simple, basic lobby. I’m not using any options on the teleport. I can’t see what I’m doing wrong.