Hey everyone.
I have my Phone on my desk with a testing account, and my computer with my main account. I’m trying to test this system. I am trying to teleport everyone to a server of a map.
So I’m getting the error:
HTTP 400
and if I change my PlaceID in my script to my main game’s ID, it works. I’ve read another article, and I tried it, but nothing worked.
Script:
local playerList = {}
local maps = {
["Map One"] = "Amazon",
["Map Two"] = "Vancouver Island (Teams!)"
}
local tp = game:GetService("TeleportService")
local random = math.random(1)
game.Players.PlayerAdded:Connect(function(player)
print("User"..player.UserId.." joined.")
if #playerList < 10 then
table.insert(playerList, #game.Players:GetPlayers(), player)
print("Added User"..player.UserId.." to playerList table.")
end
end)
repeat wait() until #playerList == 2
print("Player count just hit max players!")
for _, plr in pairs(playerList) do
if random == 1 then
local rServer = tp:ReserveServer(3345624011)
game.ReplicatedStorage.TeleportToNewPlace:FireClient(plr, random, rServer)
print("fired event on all players involved with recent matchmaking.")
wait(3)
tp:TeleportToPrivateServer(3345624011, rServer, game.Players:GetPlayers())
end
end
Thanks so much! Any help is appreciated.