In regards to this suggestion, It is correct.
I’ve looked high and low for a straight forward answer as to how to use TeleportAsync() to teleport players to a reserved server without getting the HTTP 403 error.
It turns out there is a simple explanation;
which is why I’m here to explain and hopefully nobody else will struggle to find this information again.
Supposing you are teleporting from ‘Place A’ too ‘Place B’;
there are a couple checks you can do:
Check #1:
See if the error fires in a live session after
Committing your teleport scripts, Publishing the game, and Launching the game from the Roblox browser (Not from Roblox Studio).
Once in ‘Place A’ open the Console (press F9) and select the Server Tab on the top right.
If the error does Not show up in the live session, that’s great!
Tip: To ensure your script is running and the error is not firing, you can try surrounding the broken line with print statements. If the prints show up and nothing appears between the two prints then you should be good.
Example: (ServerScript in Place A)
print("before error")
TeleportService:TeleportAsync(placeId_B, {player}, teleportOptions) --This line through the error for me.
print("after error")
Good Output:
-- before error
-- after error
Bad Output:
-- before error
-- ⚠ HTTP 403 (Forbidden)
Check #2:
Add a ServerScript in ‘Place B’ that prints the game.PrivateServerId.
if the PrivateServerId is a blank string (A.K.A “” ) then you are in a public server.
if PrivateServerId is Not blank then your server is a private or reserved server.
Example: (ServerScript in Place B)
if game.PrivateServerId == "" then
print("This is a Public Server.")
else
print("This is a Reserved Server.")
end
print("reservationID =", game.PrivateServerId)
Your PrivateServerId may look something like this:
-- reservationID = 013ee84b-c3cc-483a-8a37-d2ed3eaa1cffe