I added this to the end of my script to teleport the player to another place in the queue after the timer is over, however it wont teleport the player for some reason.
local function teleportPlayer()
if #queue > 0 then
billboard.Frame.Time.Script.Disabled = false
local players = {}
for i = 1, #queue do
if game.Players:FindFirstChild(queue[i]) then
table.insert(players,game.Players:FindFirstChild(queue[i]))
else
table.remove(queue, i)
end
end
local server = TeleportService:ReserveServer(placeId)
teleporting = true
game:GetService("TeleportService"):TeleportToPlaceInstance(placeId, server, players)
repeat wait() until #queue <= 0
billboard.Frame.Time.Script.Disabled = true
billboard.Frame.Time.Text = ""
billboard.Frame.Time.TextColor3 = Color3.new(1, 0, 0)
teleporting = false
end
end
while wait() do
seconds = 10 --How Many Seconds Till Teleporting.
for i=1, seconds do
seconds = seconds - 1
if billboard.Frame.Time.Script.Disabled == true then
billboard.Frame.Time.Text = "Teleporting in "..seconds.." seconds"
end
wait(1)
end
teleportPlayer()
end
** You are now Level 4! **