Issues reserving servers

I’m part of a development group working on a lobby system that teleports to different games and manages running ones. However, I am unable to reserve servers as the following error keeps popping up:

BAD REQUEST

I don’t understand what it is that I am doing wrong,I have checked the place ID and amended some of the module. What am I doing wrong?

Disclamer
I have replaced the game ID with a placeholder to keep the game hidden.

Module Code

	local reserveSuccess, reserveResult = pcall(function()
		local MapName = DataTable.Map
		if MapName == "Warehouse" then
			serverCode = TeleportService:ReserveServer([ID HERE]) --Erroring here
 		end
	end)
	if reserveSuccess then
		module.Games[#module.Games+1] = DataTable
		module.UpdateGameListings(Player, DataTable)
		if tostring(FirstThreeLetters) then
			if isPrivate then
				local sendingTable ={
					Password = FirstThreeLetters..RandomNumber,
					AccessCode = serverCode

				}
				local publishSuccess, publishResult = pcall(function()
					MessagingService:PublishAsync(MessagingTopic, sendingTable)
				end)
				if publishSuccess then
					print("Sent The Following Password To Server "..sendingTable.AccessCode..": "..sendingTable.Password)
					TeleportService:TeleportToPrivateServer(serverCode, {Player})
				else
					warn(publishResult)
					--Send System Notification Failure Message
				end
			end
		end
	else
		--Prompt System Notification Failure Message
		warn(reserveResult)
		print(reserveResult)
	end

Make sure the place id you’re trying to reserve a server of is in the same universe of the starting place which makes the reserve servers. See here to know about teleporting players to a different place: Publishing Experiences and Places | Roblox Creator Documentation

And I suggest using :TeleportAsync instead of :TeleportToPrivateServer, it’s an old method. - TeleportService | Roblox Creator Documentation

TeleportService:TeleportAsync(serverCode, {Player})
1 Like