I've been working on a game that will teleport all players inside the part, and or touching the part to a reserved private server and haven't gotten past this current issue of HTTP 400 (Bad request). I've been at this for hours and have been searching for other people who've had this problem and haven't found an answer yet!
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local reservedAccessCode = TeleportService:ReserveServer(game.GameId)
local function playerAllowedToTeleport(player)
local access = player:FindFirstChild("important")
if access and access:IsA("BoolValue") then
return access.Value
end
return false
end
local queue = {} do
for _, Player in pairs(Players:GetPlayers()) do
if playerAllowedToTeleport(player) then
table.insert(Player, queue)
end
end
end
TeleportService:TeleportToPrivateServer(5022895586, reservedAccessCode,players)

4 comments
Did you even define "players"?
on line 15 capitalized p in player
you can't teleport in studio.
Fixed the script.