Create New Server and Send Specific Players to it

Hello,
I’m looking to make a system which can take an input of specific players, create a new server from a separate place inside the game, and move those players to it. The server should only be accessible by those players.

I’ve looked around the forums, and I have found some similar questions, but I’m not really sure how to start, and none of them fit my needs exactly. I’ve seen these posts going on about MessagingService but I’m confused as to how I would properly utilize it in this scenario. I have a moderate amount of knowledge in Lua, I don’t consider myself an expert but I know a lot about the language and I’m well versed in how it operates.

I do currently have a system that can send players from the main server to another server, though it does not take specific players, and just fills the servers as full as possible.

I really don’t have any idea on how to go about making this so if someone could point me in the right direction it would be greatly appreciated.

You could use TeleportService:ReserveServer() since it creates a new server and only accessible teleporting with access code.

MessagingService will not be use to create servers that are accessible by specific players. MessagingService is for cross-server messaging like sending data from a server to another server.

2 Likes

This seems to work, although I’m encountering some weird error where it doesn’t teleport the players to the place that holds the ID given, and instead just sends them to a private server of the current running place.

Are you sure you are Reserving a server of the correct place id? Say you have a lobby and a dungeon and you want to teleport a group of players from the lobby to the dungeon, you would need the place id for the dungeon and not the lobby. You also dont want to be using the game id which is different than a place id.

Triple check the ID, it was correct, I just noticed that I had drafts on and wasn’t applying my edits. :confused: