Queue System teleports 2 Players!

I am trying to learn how to make promixityprompt that allow two players to spawn in a specific place (inside the game.) and not be able to leave until a timer goes up. (preferably a gui that displays the timer.)

Please keep in mind I’m still learning on how to do certain things like making a table, making functions, and understanding all of the things that will be required to make this. I have been scripting for a while but I’m self taught and I have no idea on how certain things work.

  1. I know how to make the proximityprompt and the gui and script it to where if you click the proximityprompt a gui will appear. But I have no idea on how to make a queue system to which a player can leave the queue and join the queue using a proximity prompt. (for a better example of what i mean by this) the shadow boxing game queue system


  2. I have tried using youtube tutorials but I haven’t found any the can help me achieve this queue system that I would like. If anyone could help me with this I would appreciate it a lot!