Will players being teleported at the same time be teleported to separate servers?

Hello devforum! :smiley:

Me and my brother have recently been working on a story-style game like camping and I want players to teleport to another place when there is enough players. The only problem is I have one concern and that is that the players may not be teleported to the same place or if a game is not full they may join one that is already in progress. Is there a way of keeping this from happening or is this not a problem?

There is a folder inside the model with all the players in it. I also have a value with the place id in it, that is what PlaceId is.

Here is the teleportation part of the script I have so far:

local TS = game:GetService("TeleportService")
local plrs = script.Parent.Players:GetChildren()
		
for i, plr in pairs(plrs) do
   TS:Teleport(script.Parent.PlaceId.Value, game.Players:FindFirstChild(plr.Name))
   plr:Destroy()
end
1 Like

i think you need to use Teleport:TeleportPartyAsync or TeleportService:TeleportToPrivateServer for teleporting a group of Players to a reserved server here is a full link TeleportService | Documentation - Roblox Creator Hub

1 Like

I believe inorder to do what you want (teleporting players to another place like Camping), you have to use TeleportService:ReserveServer() and then teleport them using TeleportService:TeleportToPrivateServer()

I’m not sure how you’d do that so the best way ot understand how would be to read the information the dev wiki on both of these

ReserveServer and TeleportToPrivateServer

2 Likes

Wow thank you! I’m just having a look at the articles now :slight_smile:

1 Like