Scripting support please

Hi there everyone, im looking for someone to point me in the right direction in terms of what im trying to achieve.

What I’m trying to achieve is I want to have a server that players join (main/hub server). In this im going to have buttons that players can press and each button will be a different game mode. Depending on which game mode the player chooses I would like them to be teleported to a separate server (still within the main game) and this server will have the game mode running. I want multiple players to be able to be sent to the same server and then a different server once that is full.

It won’t let me upload the video file but if you checkout Michael’s zombies you will see what I mean.

I know that one way of doing this is to pass the desired game mode via the teleportData argument of Teleport:

I believe Get/SetTeleportSetting does almost the same thing, but I haven’t messed with teleports so I’m not sure if one or the other is better for this.

I recomendé you this

  1. Set up the main/hub server: Create a Roblox game in Roblox Studio and design the main/hub server. This server will contain the buttons for different game modes and handle the teleportation logic.
  2. Create separate game mode places: Create separate places for each game mode you want to offer. Each place will represent a different game mode and will have its own gameplay mechanics and logic specific to that mode.
  3. Implement the teleportation logic: On the main/hub server, create a script that handles player teleportation. When a player clicks on a game mode button, the script should determine which game mode place to teleport them to.
  4. Manage server population: To manage the population of each game mode place, you can use Roblox’s built-in teleportation system combined with server hopping. This allows players to join different game instances if the current instance is full. By default, Roblox automatically manages the server population for you.
  5. Transfer player data: Roblox automatically transfers the player’s data, such as their inventory and character appearance, between game instances when teleporting. However, if you have specific game mode data or state that needs to be transferred, you can use Roblox’s DataStore service or RemoteEvents to synchronize player data between the main/hub server and the game mode places.
  6. Test and iterate: Test your game thoroughly to ensure that players are correctly teleported between the main/hub server and the game mode places. Iterate on your implementation based on feedback and make any necessary optimizations or improvements.
    Remember to refer to Roblox’s documentation and resources for more detailed information on how to implement specific functionalities

Example:

local TeleportService = game:GetService("TeleportService")
local destinationPlaceId = -- PlaceId of the game mode place you want to teleport players to

-- Connect a button click event to teleport players
game.Workspace.Button.ClickDetector.MouseClick:Connect(function(player)
    -- Teleport the player to the destination place
    TeleportService:Teleport(destinationPlaceId, player)
end)

Customize the script according to your button hierarchy and game mode places.

Hi thank you for your reply. I want to keep the servers inside the same game so players aren’t joining multiple different games for each game mode