Help creating cancellable matchmaking system

Hello, fellow Roblox coders!

What I’m trying to make is a Matchmaking system replica, similar to CS:GO, and what I’m trying to achieve is to display on the user screen if a server is available and wait some seconds before teleporting that player, and display a message that a match was found, I also want to add the option to cancel the teleporting of a player to that place but I don’t know how to achieve that. I’ve managed to “find” available servers using TeleportService:TeleportAsync() and what I’m trying to achieve here is to display a message before teleporting and adding the option to cancel the teleportation, in case the player accidentally clicked the button. Is something like this achievable? All help is appreciated!

Have you read this:

Also, I believe this battle royale template has a system similar to what your asking for:

https://developer.roblox.com/en-us/resources/templates/battle-royale-intro

Experiment the system (in the lobby) here:

You can take the open source version in the second link and find/study the code for the lobby teleportation system.

1 Like

Maybe when they click teleport have a UI pop up

It would say something like “Teleporting in 10 seconds…”
The script would wait 10 seconds then call the teleport

The player would have these 10 seconds to cancel the teleport

1 Like

Thank you both for your help, your answers provided me with a lot of knowledge for future developments! Thank you! :smile: