I am trying to make a “Join a friend” like feature in a game of mine but I’ve gotten stuck!
The goal is:
When the player press’s play they join a new/empty server. The hard part (for me at least) is teleporting a DIFFRENT player into that same new server.
I have scoured the dev forms for some time now looking for a answer with no prevail!
If you have any questions about the question feel free to ask!
How would I go about making the players join empty servers? I guess you could just do a check of the player count when the player joins and depending on that tp the player to another server on repeat until it creates a new server or something, but that could take a while.
Alright I tried using TeleportToPlaceInstance to teleport the player to the reserved server. There where no errors besides that its restricted, yet it does not say that teleportation is restricted in public servers. Leading me to assume you cant teleport a player into a pre existing reserved server.
Heres the current TP code
local TS = game:GetService("TeleportService")
game.ReplicatedStorage.Teleport.OnServerEvent:Connect(function(plr,playerid)
local ci, _, endplaceid, endserverid = TS:GetPlayerPlaceInstanceAsync(playerid)
TS:TeleportToPlaceInstance(endplaceid, endserverid, plr)
end)