How to actually fix "A specified member cannot join the destination place" error

I’ve gotten the error above a million times when making my battle royale game. I’ve tried soooo many variations of the same script and they’ve failed every single time. The crazy thing is the script used to work and now all of a sudden, it’s decided not to work even though I changed absolutely nothing. I’ve tried TeleportPartyAsync() and TeleportAsync(), both of them giving the same error. I’m trying to teleport a group of players to a different place within the same experience, the experience and the place is public, i’m not already in the place i’m trying to teleport to, and this should really be simple but it isn’t for some reason.

Elevator Script:

Teleporter Script:

Error Proof:

Any help would be appreciated.

Hry just saying if you copy the code in the script then put the code inbetween these ``` it would formated and easyer to read

1 Like

Yeah… that would’ve made it look better, I don’t know how to write lua code in the devforum threads though

1 Like

Are you on pc or mobile rn

I’m on my computer at the moment

So 8f you click the quotation marks in the little bar up top it would say paster code in here and it would be formated correctly

ok i did the format thing you said but it doesnt look the way it does in other forum posts

Could you print out the players varible in the teleport script im just on mobile rn so i cant test on studio

ok ill do that, also i found out the second image doesnt need to be there because the first image is the whole script except for an “end”

i cant believe i didnt think of printing it

Also in the tp script you could also rather than doing elseif yhing == 1 so on you could do

If elevator >= 1 and elevator < 5 then
-- code
End

anyways it said the players were “table:0x05” and a bunch of random numbers

I don’t think table:0x05 is a player so ill try to make some adjustments

Its a table so the ranfom numbers are probely userid so do a for loop like

for _, Userid in ipairs(Players) do
If elevator >=1 and elevator  <=4 then
--  teleport code
    end
end

Its random numbers and letters actually, and after making some adjustments,


I got a different table, but the same error nonetheless

Oh wait, these are the code changes,
image

When inserting the player do player.userid

I got “Unable to cast value to object”, I’m gonna try to teleport each individual player and see if that does anything because I’ve heard TeleportAsync() will work when its just one person

Wait nvm dont i was reading the docutmation on teleport serivce its the player unstance not the uderid sorrry

Why dont just teleport the players in the for loop rather than adding to a table?