Http 400 bad request for unknown reason

  1. What do you want to achieve?
    The player to teleport without an issue

  2. What is the issue? Include screenshots / videos if possible!
    The title displays the error code when attempting to teleport

I know the issue isn’t in the firing of the event, its the teleport that causes the error (and doesn’t work of course.)

local rp = game:GetService("ReplicatedStorage")
local sendEvent = rp:FindFirstChild("Make_Server")
local ts = game:GetService("TeleportService")

sendEvent.OnServerEvent:Connect(function(player, difficulty, place)
	local dif
	local code
	if difficulty == 1 then
		dif = "easy"
	elseif difficulty == 2 then
		dif = "medium"
	else
		dif = "hard"
	end
	
	if place == "iceCaves" then
		code = 698944913
	end
	
	print(code)
	print(dif)
	
	
	local reserve = ts:ReserveServer(code)
	ts:TeleportToPrivateServer(code, reserve, player, nil, dif)
end)

Could you please send a screenshot of the error you’re getting?

image

well this is it, im 99 percent sure the parameters are correct

I’m pretty sure you need to put the players in an array, try this instead:

ts:TeleportToPrivateServer(code, reserve, {player}, nil, dif)

Still the same issue thx for the response tho.

well Ill figure out the issue over time I guess thx for the help

Make sure that 698944913 is either the same as game.PlaceId, or that it’s a place within the same universe as where you are teleporting from.