I keep getting error HTTP 400 error when trying to use :ReserveServer

Hey everyone.

I have my Phone on my desk with a testing account, and my computer with my main account. I’m trying to test this system. I am trying to teleport everyone to a server of a map.

So I’m getting the error:

HTTP 400

and if I change my PlaceID in my script to my main game’s ID, it works. I’ve read another article, and I tried it, but nothing worked.

Script:

local playerList = {}
local maps = {
	["Map One"] = "Amazon",
	["Map Two"] = "Vancouver Island (Teams!)"
}
local tp = 	game:GetService("TeleportService")
local random = math.random(1)
game.Players.PlayerAdded:Connect(function(player)
	print("User"..player.UserId.." joined.")
	if #playerList < 10 then
		table.insert(playerList, #game.Players:GetPlayers(), player)
		print("Added User"..player.UserId.." to playerList table.")
	end
end)
repeat wait() until #playerList == 2
print("Player count just hit max players!")
for _, plr in pairs(playerList) do
	if random == 1 then
		local rServer = tp:ReserveServer(3345624011)
		game.ReplicatedStorage.TeleportToNewPlace:FireClient(plr, random, rServer)
		print("fired event on all players involved with recent matchmaking.")
		wait(3)
		tp:TeleportToPrivateServer(3345624011, rServer, game.Players:GetPlayers())
	end
end

Thanks so much! :slight_smile: Any help is appreciated.

Are you using PlaceId or GameId? You said you’re using PlaceId but set it to your main game’s ID. Be sure you’re using the place ID and not the game ID.

1 Like

It still doesn’t work when I use PlaceID, or GameID. Thanks! :slight_smile:

So my error also tells me that it is Line 19 (:ReserveServer() line) that is the problem.

Mind posting the full error message that you get? HTTP 400 isn’t enough information to go off of, since there could be a lot more to dissect from the actual error message you’re getting.

Sorry, it’s

    17:39:25 -- HTTP 0 (HTTP 400)
        Stack Begin
        Script 'ServerScriptService.Map', Line 19
        Stack End

Odd question, but are you running this in a live server or Studio? Studio cannot use ReserveServer. I figure I might as well ask since your code is all correct yet the request is being dropped.

Somewhat of an interesting issue, or the answer is just flying over me right now.

Live server. I have my phone on my desk with one account, and my computer on my main account.

I should also tell you, I am using PlaceID in this script displayed, and I tried GameID and it also didn’t work.