Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make private servers that friends can join via TeleportService:TeleportToPrivateServer?

I want to make private servers free in my game, I have a separate place for them. Let's say the player (Ralph) clicks the button to go to the private server from the lobby, and one of their friends (John) joins the lobby after they teleported. How would I make it so that John can teleport to the private server Ralph is in?

1 answer

TeleportToPrivateService if cool. The way it works is you get a code with ReserveServer(), and the code is later one of the parameters.

TS:TeleportToPrivateServer(game.PlaceId,code,{plr}) 

Those are the params. Note that the players you want to teleport have to be in a table, even if there is only one.

If you want to be able to allow friends to teleport to each other's private servers, you should use a module script to save the codes from ReserveServer. i would use a table setup like this inside the module:

local module = {{playerID,ServerID},{playerID,ServerID}......}
return module

and.... yeah! If you need more help reach out to me @BlobMaster#8156 or message me on roblox. Hope this helps!

This discussion is preserved as it was. New answers, comments, and votes are closed.