How do i make a waiting for players script?

I want to make a waiting for players script, so, when all the players in a group in a different game are teleported to the game, the game will start, but i don’t know how to do it, thanks for reading. :+1:

2 Likes

If the two games are in the same universe, then you can pass a table with all the players’ names to the other game and wait until all the players from that table joined.

Yeah, but now, if someone leaves before/after teleporting??

You could wait, say, 15 seconds and if the player didn’t join, just assume that they left and start the game.

I’m pretty sure this would be a pretty poor solution, considering people don’t have the same connection times.

But how do I send a table with the players?

You could use data store or I guess messaging service to send over a table of players to the another place as long as this other place is under the same game as the first one.

You can use TeleportData for this.
For more information visit https://developer.roblox.com/en-us/api-reference/function/TeleportService/Teleport

2 Likes

Honesty waiting would not be a bad solution considering if your not in the game within 30 seconds you should not be playing anyway

I didn’t understand the page…

Here are some example scripts: https://developer.roblox.com/en-us/api-reference/function/TeleportService/GetLocalPlayerTeleportData

2 Likes