I don’t need anyone to write an entire paragraph of script as my solution, right now I’m focus on how do I make a custom server with the ability with creation ( the player able to create a server which sends them to a place id) and joining (with the player able to join the same exact server the player created) I don’t want YouTube tutorials as it doesn’t even explain probably on how they work and what’s the mechanic behind it, like how they are able to get the amount of players from a completely different place id server (place id which means a place inside the game)
any explanation with some examples would help alot
1 Like
TeleportService:ReserveServer if you want to create a private server and not teleport to it. Use TeleportService:TeleportAsync and create a TeleportOptions object for the function that contains the access code returned by ReserveServer
. If you want to teleport immediately, you can toggle “ShouldReserveServer” in the teleport options and it will auto-create the private server for you
You shouldn’t need to reserve a server and not teleport to it immediately. You can create a party and teleport them all at the time of initialization with “ShouldReserveServer”
1 Like
i mean i want it like a… how to i explain, like the person creates a server then gets teleported to it, then if any person who wants to teleport to the server the person created, there will be a button with the persons server name and if they click on it, they get teleported to the exact server the person is in
1 Like
Then you will need to register the party leader into a MemoryStoreHashMap via MemoryStoreService. If you’re not already aware of this service, it’s optimized for short-term data storage. You’ll store the reserved server access code recorded in the TeleportAsyncResult object returned by TeleportService:TeleportAsync
. You could also create a cache for the access codes of servers created by players in your same server. When a player looks up the server by user ID/name, or finds it cached in their lobby, selecting the server will have its stored access code put into TeleportOptions.ReservedServerAccessCode and have TeleportService:TeleportAsync
called. You’ll use MessagingService to signal when the reserved server shuts down. Use it to confirm the server was successfully populated before caching it
4 Likes