QueueService: A simple module for all your queuing needs!

Here is a script I found, edit it to your needs:

local placeId = 123
local playersList = game:GetPlayers()

game:GetService('TeleportService'):TeleportPartyAsync(placeId, playersList)

And try to put it in your module somewhere

I got that code from this post: How to teleport a group of players into the same server - #3 by UnderMyWheel

1 Like

I donā€™t think that will teleport them to the same server but Iā€™ll do some more research.

1 Like

Hello again, what is the status on your reasearching right now?

I wanted to know if you could make a QueueService2 where it makes reserved server with the specified placeID/gameID after the timer has ran out and teleports the players into it

It is a good module, I will definitely use this on my game but the things I have to fix/add on the local copy of the queueservice are:

1- Make MinStart optional
2- Add queue matchmaking ā€œidā€™sā€ which makes different queues for different game modes.
3- Make ā€œInitiatedā€ event a function and make it able to return a value, if its false then queue gets cancelled, if its true the game proceeds to teleport players

It would be cool to see these on the module itself.

You can do whatever you want with it, itā€™s open source :slight_smile:

1 Like

I can definitely do that. You should already be able to create multiple queues though.

Thanks for the suggestions!

2 Likes

When I checked your code I found that after a queue is finished and players are teleported, instead of clearing the queue it destroys whole module(if i readed it correctly) I also had to fix that.

This looks very interesting. I havenā€™t dug into it yet, but Iā€™m curiousā€¦

Are the queued players sent to the same server in the destination place? Or does this merely teleport each player to the place, auto-assigning as if they joined individually?

I donā€™t think it does. It just deletes the queue object that was created.

They are teleported to the same place

1 Like

Does it re make it? When I checked it just sets it to nil

After the queue is initiated the queue object is set to nil to avoid the attempted use of an initiated queue

I mean you could set the player count and some other stuff to 0 then it should work correctly after the teleport.

Are you unable to create a new queue after?

Imgur

Its not teleporting, I have set the minimum and max players to 1. The queue gets initiated but its not teleporting. I have turned on API and Http service, and the game I am trying to teleport it to is in the same universe created by me.

I used the demo script you provided in your wiki.

I havent tried but in your code it only sets the queue object to nil and doesnt make a new one from my understanding.

Did you test it from studio or not?

In a published place ā€Œotherwise if I was in studio the client memory usage would be above 1k