#403 - Forbidden

7 messages · Page 1 of 1 (latest)

atomic canyon
#

I am getting errors saying I can't reserve a server and I'm unsure if im doing it incorrectly

#

The error is at the line stating

local reservedServer = teleportService:ReserveServer(lobbyId)

#

The line underneath the TeleportToPrivateServer() line was to see if it would teleport all the players to just a point on the map, which it does so I assume its not a problem with the loop

#

This is supposed to be a lobby queue similar to that of doors

#
local function teleportPlayers()
    teleporting = true
    print("Starting teleportation for players:", playersInQueue)
    local reservedServer = teleportService:ReserveServer(lobbyId)
    for _, plr in pairs(playersInQueue) do
        if plr and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
            print("Teleporting player:", plr.Name)
            teleportService:TeleportToPrivateServer(Enum.TeleportType.ToReservedServer, reservedServer, playersInQueue)
            --plr.Character.HumanoidRootPart.CFrame = game.Workspace.SpawnLocation.CFrame 
        end
    end
    playersInQueue = {} -- Clear the queue
    wait(timeGivenForTP)
    teleporting = false

    -- Reset the timer and allow it to start again
    currentTimer = openQueueTime
    timerCanDescend = true
    print("Teleportation complete, timer restarted.")
end