Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

Log in to vote
0
Answered by 4 years ago

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!

Ad

Answer this question