I'm trying to teleport to a VIP server, but TeleportAsync says I can't pass the InstanceId with ReservedServerAccessCode

  1. What do you want to achieve?
    My API returns the private server ID, and access code of all accessible VIP/private servers for the specified placeId and current user. I’m using this info to teleport the current player to the selected VIP/private server.

  2. What is the issue?
    I’m getting an error saying I can’t specify an Instance ID with ReservedServerAccessCode (See screenshot). If this is the case, how do I teleport a player to the private server instance, if I can’t provide the necessary details to do so? I can’t only specify the Instance Id, because the access code is required. And I can’t only specify the access code, because Roblox needs to know what server to connect to.

  3. What solutions have you tried so far?

I’ve tried following Teleporting Between Places and applied the following methods to no avail:

  1. Using the PlaceId with the reserved access code. I get Error Code: 773
  2. Using the UniverseId with the reserved access code. I get Error Code: 773
  3. Using PlaceId with access code and private server ID (as the instance ID). I get a warning saying I can’t set the Instance ID when specifying a reserved access code.

How do I teleport players to a private/VIP server if I can’t provide the access code and the private server ID?

There are properties to input both the ReservedServerAccessCode and the ServerInstanceId in TeleportOptions. As the warning states you should not be giving instance ids to ReservedServerAccessCode - it’s telling you that very literally.

ReservedServerAccessCode is strictly for reserved server access codes so I’m confused as to why you’re inputting other data to that field. You can provide TeleportOptions with the access code in the dedicated field. See TeleportOptions for documentation.

You do not need ServerInstanceId with ReservedServerAccessCode because that one’s for public matchmaking. The backend should handle determining which JobId is associated with the access code.

1 Like

Hello! Thanks for your reply. I’ve tried that, but I receive this error message:


Could you supply extensive details about your problem so it’s easier to understand what’s going on? I won’t provide you an exhaustive list but think deeply about what may be important to include. This is a legitimate error so you could be feeding illegal values to the fields.

  • Are the place you’re teleporting to and from in the same game?

  • How do you create reserved servers? ReserveServer or TeleportOptions?

    • Based on how you do this, could you create a new private server or take an existing one and post both the access code and the PrivateServerId?
  • Which teleport method are you using?

    • If TeleportAsync: please provide the properties (ReservedServerAccessCode, ServerInstanceId and ShouldReserveServer) being supplied.

    • If TeleportToPrivateServer: please provide the arguments being supplied.

With TeleportAsync, you only need to provide the reserved server access code to ReservedServerAccessCode. No teleport method for private servers asks you for the PrivateServerId and you aren’t doing public matchmaking so you don’t need a JobId either. This is all stuff I mentioned in my first post. I’m also not sure what you tried in order to produce Error 773, can’t just tell me “it didn’t work” and provide no context.

2 Likes

As I mentioned, I’ve tried the “Teleporting to private server” method as described in Teleporting Between Places

I’ve also tried the following small bit of code using the TeleportToPrivateServer method:

local code = TeleportService:ReserveServer(tonumber(place)) – This is line 428, which is throwing the error in the screenshot
TeleportService:TeleportToPrivateServer(tonumber(place),code,{plr})

I’ve tried this with and without tonumber(), thinking that maybe the backend doesn’t like the string. I’ve added print statements showing the place value right before using it in ReserveServer. Both attempts give me the same HTTP 400 (BadRequest) error in the dev console.

“No teleport method for private servers asks you for the PrivateServerId and you aren’t doing public matchmaking so you don’t need a JobId either. This is all stuff I mentioned in my first post. I’m also not sure what you tried in order to produce Error 773, can’t just tell me “it didn’t work” and provide no context.” - The “Teleporting to private server” method gives me error 773 when providing the required details stated in the doc. These extra options (Such as the private server Id) are only being mentioned because it’s an extra step I did to try and get this to work.

This is why it’s important to provide context; if you don’t give context, I can’t help you. I gave you a starter list of things to check for or provide so they can better help me understand the problem, none of which you gave. It’s also helpful if you apply the whole post rather than selecting sections of it to try out.

Although I still do not have said context so I can barely help you as it is, the PlaceId alone gives me a clue - 920587237 is the PlaceId of the starter place of Adopt Me!. You can’t reserve servers on places you don’t own or that are not part of the same game. Reiterating why it’s important to provide context. First thing I asked:

Are the place you’re teleporting to and from in the same game?

2 Likes

In your post it says you’re using a instanceId and a access code at the same time. You cannot do this for 1 reason. The InstanceId is for a specific public server NOT a reserved server. To teleport to a reserved server all you need is the access code. The PrivateServerId returned by :ReserveServer() is generally used to store the access code in a data store there might be some other uses I’m unaware of but I haven’t found them yet.

Also
This is scripting support without your code it makes it extremely difficult to figure out what your problem is. I had to reread your post and its replies a few times before I noticed you said this. If I had your code I would’ve been able to spot it much quicker.

Also Also
As colbert pointed out you cannot reserve a server in another game.

1 Like

How hypocritical of me, being an advocate of context lol. I sincerely apologize. Here’s a quick summary of what I’m doing using Roblox’s functions:
local code = TeleportService:ReserveServer(tonumber(place))
TeleportService:TeleportToPrivateServer(tonumber(place),code,{plr})

The confusion I think here is that I’m trying to create a reserve server in another game. This is not the case, I’m trying to teleport users to an existing VIP server. I’ve suspected this limitation already, so I went for getting the existing VIP server details (Of VIP servers that the player already owns, or is invited to), this is where I got the private server Id, and went on to trying to pass this using the additional teleportoption mentioned. My API uses the user’s cookie from the external connection between my application and AWS server to function. Since the server already exists, and I have the id for it, it was my understanding that since VIP/personal servers are reserved servers, I should be able to teleport to it using either method mentioned in this thread, no?

EDIT: I’m getting private server details using Roblox’s API: Games Api

Ah ok I see.
So just to make sure I have this all correct you’re trying to teleport a player in game to a VIP server bought through the roblox game page?

If thats the case you’ll need to give me a second to test that.

In theory you should be able to as long they are in the same game. But I’ll have to test it so give me a bit.

1 Like

Short answer is no.

Longer answer is that I tried to teleport from a public server to a VIP server purchased from the game page around 10 times. Each time failed telling me it was a restricted place even though it was the server I purchased and had ownership of.

As for teleporting to reserved servers it worked fine each time so that should be fine.

So if you allocate a reserved server and then teleport to it you should be fine.
But VIP/Personal servers won’t allow you to even if the player being teleported owns them.

1 Like

Correct. I would like for the user to be able to join, even if the owner has not joined. I have tried numerous methods (Which I’ll list below) even while the owner was in game, and I still get error 773, saying the access code is invalid.

Test one: TeleportService:TeleportToPrivateServer(place,accesscode,{plr})
(place = place Id, accesscode = accesscode of private server fetched from API)

Test two (And yes, I know it’s silly, but I was running out of options: TeleportService:TeleportToPrivateServer(privateserverid,accesscode,{plr})
(privateserverid = PS ID fetched from site, accesscode = accesscode of private server fetched from API)

Test 3:
local reservedServerCode = privateserverid
local teleportOptions = Instance.new(“TeleportOptions”)
teleportOptions.ReservedServerAccessCode = reservedServerCode
SafeTeleport(place, {playerToTeleport}, teleportOptions)

Test 4:
local teleportOptions = Instance.new(“TeleportOptions”)
teleportOptions.ReservedServerAccessCode = accesscode
SafeTeleport(place, {plr}, teleportOptions)

Test 5 (I thought this would work, but I got told I can’t use SID):
local teleportOptions = Instance.new(“TeleportOptions”)
teleportOptions.ReservedServerAccessCode = accesscode
teleportOptions.ServerInstanceId = privateserverid
SafeTeleport(place, {plr}, teleportOptions)

1 Like

Ah, that sucks. My goal was for users to teleport to their VIP servers for any game from my hub. Are there any alternative methods to achieving this? Perhaps a Roblox API that could be utilized?

1 Like

No I don’t think so.
Even if you could teleport to VIP servers you owned in the same game calling the teleport I highly doubt roblox would allow you to teleport to VIP servers you (own/have access to) in another game.

I’ll give it a look and edit this message if I find one.

1 Like