Error http 400 (badrequest)

  1. What do you want to achieve?
    I’m having some problems sending to the other game vip server

  2. What is the issue?
    image

  3. What solutions have you tried so far?
    There is still a problem with changing the location number

TeleportService:ReserveServer(28497703206749907625047702915597)
TeleportService:TeleportToPrivateServer(20321167, code, {Player})

ServerScriptService’s script

local TeleportService = game:GetService("TeleportService")
local Event = game.ReplicatedStorage:WaitForChild("Teleport")

Event.OnServerEvent:Connect(function(Player)
	local code = TeleportService:ReserveServer(28497703206749907625047702915597)

	TeleportService:TeleportToPrivateServer(20321167, code, {Player})
end)
1 Like

Give these a read when you have some free time, it might help you out a bit: TeleportService:ReserveServer
TeleportService:TeleportToPrivateServer

Firstly, I’m going to assume “28497703206749907625047702915597” isn’t a valid placeId. The first parameter of “ReserveServer” would be the PlaceId you’re reserving the Private Server for. Remember, you can only create a ReserveServer if:

  1. The placeId is the place you’re teleporting to (in which case use game.PlaceId)
  2. The placeId is in the container of the game.

Otherwise, you won’t be able to teleport to a private server of a game. Secondly, the placeId for 20321167 is Pilot Training Flight Simulator, which I assume you don’t own. This method of creating a reserved server for a game you don’t own won’t work.

1 Like

I fixed a problem but another problem appeared

local TeleportService = game:GetService("TeleportService")
local Event = game.ReplicatedStorage:WaitForChild("Teleport")

Event.OnServerEvent:Connect(function(Player)
	local code = TeleportService:ReserveServer(game.PlaceId)

	TeleportService:TeleportToPrivateServer(420362350, code, {Player})
end)

420362350 of my config vip server number

Your specific error here is because you’re generating a reserved server code for game.PlaceId, and then using that code generated specifically for game.PlaceId to try and teleport to 420362350.

Regardless of the error, this idea is fundamentally flawed though, and I’ll explain why below:

  1. You can only reserve server for the current game your in. You could in theory create a seperate place under that game and teleport there. I replied to a thread about this recently and went more in depth, you can read it here: HTTP 403 (Forbidden) - #8 by acazen

  2. Your use case here is you want to teleport to a previously existing private server if I’m understanding you correctly. That isn’t possible from your game. The closest thing to what you’re trying to do is TeleportToPlaceInstance, which would require a JobId of a running server instead and doesn’t work on private servers. Unfortunately a new JobId of a server is generated every single time.

TL;DR - If you’re trying to teleport into your private server you own from a different game in Roblox Studio, it’s not possible. However, you can teleport to that game instead (not in your private server, in a random server) using TeleportService:TeleportAsync or if you have the JobId of the specfic game instance you’re in, you can use TeleportToPlaceInstance assuming you have permission to join that JobId.

1 Like

I’ve given up on this one solution, I’ll try other methods but I haven’t thank