This is a fairly simple, very rustic code. I came with it on the spot and will make some small changes later. However, I haven’t identified why it takes 7 seconds for the player to be teleported.
print("starting")
--print("StandardServer")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local code = TeleportService:ReserveServer(game.PlaceId)
local playerFolder = game.ServerStorage.Lobby1
local playerList = {}
for _, item in ipairs(playerFolder:GetChildren()) do
local player = Players:FindFirstChild(item.Name)
if player then
table.insert(playerList, player)
end
end
--print("Teleporting")
print("here we go")
if #playerList >= 1 then
TeleportService:TeleportToPrivateServer(game.PlaceId, code, playerList)
else
--print("No one wants to play :(")
end
During the process the output says this: “Starting” … 7 seconds later… “here we go” and they get telaported.
At first I thought it was my internet, but I tested other games that use this concept and once the timer is at 0 I get teleported right away.