I have recently started learning to work with OOP and since I was creating a queuing system for a project of mine I decided to make this easy-to-use module for all your queuing needs!
Why should I use this?
QueueService was created with configuration and simplicity in mind while also being friendly to new developers. With all the configuration you could possibly need QueueService can be used in any queuing context; whether it’s from a UI or a touch detecting pad!
Cross-place queuing, automatically!
This module supports cross-place queuing, so if you want everyone in the queue to be teleported to another place all you have to do is supply the PlaceId
Planned updates
I was planning on making this module handle the queue after the players were teleported as well but I wasn’t able to do it from my knowledge.
I am no longer updating this module, I ran out of time.
Want to learn more?
I have created an in-depth wiki on this module, if you’re interested you can find the wiki here
Have any questions/comments?
Feel free to leave a reply to this post, I will try to get back to you as soon as I can!
Am I being misleading? It sounds very standard to what you would normally hear. KitchenAid sells cookware that doesn’t do the cooking for you, doesn’t buy the ingredients, and doesn’t pay for your electric/gas bill. But it makes sense, cookware is very helpful for cooking.
I would say, an improved version of teleport service is very helpful for matchmaking. It’s not MatchMakingService, it’s QueueService, and it can support matchmaking development. Just like cookware supports cooking.
It doesn’t work, it does not teleport the players. I am in studio and testing this and I get no message in the output saying “You cannot teleport in studio” unless that’s in a PCALL. I need to test it with a real place ID
local Players = game:GetService("Players")
local SSS = game:GetService("ServerScriptService")
--Queue Settings--
local MaxPlayers = 2 --The maximum players that can be added to the queue
local MinStart = 1 --The minimum amount of people that can trigger the queue countdown
local CountTime = 10 --The amount of time until the queue is initiated after MinStart is achieved
local PlaceId = 5557351207 --The place to teleport the players to on completion (OPTIONAL)
local QueueService = require(SSS.QueueService)
local MyQueue = QueueService:Create(MaxPlayers, MinStart, CountTime, PlaceId)
Players.PlayerAdded:Connect(function(player)
MyQueue:AddPlayer(player)
end)
Players.PlayerRemoving:Connect(function(player)
MyQueue:RemovePlayer(player)
end)
MyQueue.PlayerAdded:Connect(function(player)
print(player.Name.." has been added to the MyQueue")
end)
MyQueue.PlayerRemoved:Connect(function(player)
print(player.Name.." has been removed from MyQueue")
end)
MyQueue.Initiated:Connect(function()
print("Queue was initiated")
end)
Nice, the teleportation doesn’t seem to be working for me either. I have two games (one being the queue service game and another one is the tp-to game) but QService won’t teleport the players to the tp-to game. Here is my current script:
local Players = game:GetService("Players")
local SSS = game:GetService("ServerScriptService")
local MaxPlayers = 700
local MinStart = 1
local CountTime = math.random(10, 30)
local PlaceId = 5537670256
local QueueService = require(SSS.QueueService)
local MyQueue = QueueService:Create(MaxPlayers, MinStart, CountTime, PlaceId)
MyQueue:Start()
Players.PlayerAdded:Connect(function(player)
MyQueue:AddPlayer(player)
end)
Players.PlayerRemoving:Connect(function(player)
MyQueue:RemovePlayer(player)
end)
MyQueue.PlayerAdded:Connect(function(player)
print(player.Name.." has been added to the queue")
end)
MyQueue.PlayerRemoved:Connect(function(player)
print(player.Name.." has been removed from the queue")
end)
MyQueue.Initiated:Connect(function()
print("Function is working but teleporting isn't!")
MyQueue:Teleport()
end)
local function getTimeLeft(num)
for _, plr in pairs(Players:GetPlayers()) do
plr.PlayerGui:WaitForChild("ScreenGui").Time.Text = CountTime - num.."s"
end
end
MyQueue:BindToCount("MyBind", getTimeLeft)
It used to work when I was using the ID for my qservice game so it kept loop-tping the player into the qService game but now that I changed the ID, it doesn’t tp.