local function StartGame()
print("function started")
repeat wait()
until PlayersInQueue >= 7
print("ok")
wait(10)
if PlayersInQueue >= 7 then
print("hello")
for i,v in pairs(CurrentQueue) do
print(v)
local code = TS:ReserveServer(6794526866)
TS:TeleportToPrivateServer(6794526866,code,v)
print("here")
end
end
wait(10)
end
while wait() do
--Pcall so that if it fails it will just restart
local s,m = pcall(StartGame)
--If s is false an error occured
if not s then
--Error Report
if debugging then
else
end
end
end
For some reason, It reaches the hello print, it prints the players name in v, then it doesn’t give me any errors, and it doesn’t rpint here it just restarts the function I have absolutely no idea why it’s not teleporting the player or giving me any teleport error if it’s printing their name
I believe the 3rd parameter has to be an array of players so just put “v” in an array. Better yet, just remove the loop and pass “CurrentQueue” as the 3rd argument
I tried putting CurrentQueue as the arguement that doesn’t seem to be working either, {v} did work, but It sends us to seperate servers, how can I get all of us in the same one?