[HTTP 403 (Forbidden)] Error while excecuting teleport script?

I am trying to make a match based game similar to survivor etc.
I am making a basic “touch part to go to the match game thing” and I hit the HTTP 403 (Forbidden) error at local code = tp:ReserveServer(game.PlaceId). Any help?

local tp = game:GetService("TeleportService")

while wait(10) do
	local toTeleport = {}
	for _, part in pairs(script.Parent:GetTouchingParts()) do
		if game.Players:FindFirstChild(part.Parent.Name) then
			table.insert(toTeleport, game.Players:FindFirstChild(part.Parent.Name))
		end
	end
	local code = tp:ReserveServer(game.PlaceId) ---------- This is where the error is.
	tp:TeleportToPrivateServer(5188108096,code,toTeleport)
end
1 Like

Are you testing in studio? You can’t teleport in studio. Make sure to test in an actual game.

Also don’t call wait in the condition of the while loop but rather in the body.

I’ll test it in a actual place. I thought that the error for that was something along the lines of “Cannot teleport in studio”?

That’s what the error is conveying. HTTP 403 “Forbidden” is an error that occurs when a server forbids you from accessing it.