Hello. I have been wondering why this script does not work.
local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
wait(3)
local code = TS:ReserveServer(4062665801)
local players = Players:GetPlayers()
TS:TeleportToPrivateServer(4062665801,code,players)
Everytime I try to run it in the Roblox application, it produces this error:
HTTP 400(BadRequest)
And it points to line 6; please help me resolve this error. I have tried putting it in a pcall function, and the only thing it does when I do that is blocking the error from outputting in the server log, does not actually teleport the players.
Please help me.

2 comments
Are you currently in studio?
no