Reserved Server - HTTP 400

Hey, so I am working on a thing where I need a reserved server and I keep getting errors.
Code:

local reservId = teleportService:ReserveServer([id hidden])
local teleData = {
    lobbyNum = lobby
}
teleportService:TeleportToPrivateServer([id hidden],reservId,player,teleData,script.Load) 
teleportService:SetTeleportGui(script.Load)

Error: HTTP 400 (BadRequest)

It errors when I reserve the server and get the code. It is in a server side script, and works when I just normally teleport to the place but not when I reserve a server. I have looked through the developer forum and hub, and have not found a solution.

Any help is appreciated, thanks!

I see orange lines (errors) under the specific words:
‘teleportService’
‘lobby’

Did you put a local on them?

To start with, [id hidden]? can you show us whole code? Also, you need to place :SetTeleportGui befre Teleport

Make sure of the following:

  • The place ID is correct
  • The place you’re trying to reserve a server in is under the same universe as the lobby
1 Like

Are you testing in studio? I don’t think you can reserve server in studio.

Yes, I put a local on both of them.

Thank you for reminding me about the SetTeleportGui, but the game id shouldn’t matter as it works for normal teleportation.

Thanks, I am not too sure about how game universes work, but I just researched some and that may fix it.

Edit: It worked. Thanks!

sorry for bump but im having the same issue and cant fix it. how did you fix it with the universes?

1 Like

#1 matrix escapist here you have to enable HTTP REQUESTS in both game places in asset manager because Roblox has it set up to not auto enable itself when you enable HTTP REQUEST in the main experience because it is purposefully trying to make developers lives horrible and make it so that they can never get rich and successful from developing on their platform enjoy brother I hope you see this and are able to get it fixed thanks to my help