Teleportation should always be in the same Server

So. Today I was gonna make a server system like in other survival games like in ARK.
I tried using Teleport but that created multiple servers but that wouldnt work cause if you build something it wont get shown for the others.
Then I tried using Teleport with Place Instance that didn’t work well cause it always gave me an error what said like Roblox has shut this server for maintaince down or Place Restricted and there are no other teleport Instances I can use. I hope theres some way to only get 1 server what may be online all the time.

Hmm, what do you mean it won’t show for others? Are you using a local script for the building system?

if youre in server E1. and there are 2 server E’s. if someone builds something it would only show up in server E1 and not server E2

Oh, nevermind, I thought you were talking about local and server scripts, but well, can’t you use TeleportToPlaceInstance to teleport players to one server upon creation? Or make something like a server list in-game? I don’t think you can sync stuff between servers, but you may be able to using http services and a external worker for the buildings, not so sure…

https://developer.roblox.com/en-us/api-reference/function/TeleportService/TeleportToPlaceInstance

I tried using that but I don’t know what a JobId is. It doesnt get explained in all forums

my problem is here that I dont know how to create a server. how do I get an Id

The JobId should be the server id.
Make a server creation system in your game using ReserveServer - TeleportService | Roblox Creator Documentation

wich one the server 1 place id or the main game id

Every server has one, both the place and the main game has a jobid, it’s important to use them to make a serverlist

no what I mean is what should I reserve the server with

local code = TS:ReserveServer(game.PlaceId)
--or
local code = TS:ReserveServer(otherplace)

Yeah but I want a pre server so people dont need to create one first up

The game place, not the lobby, etc.

do you have a script example for me because I cant find any solutions that match

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
 
local code = TS:ReserveServer(game.PlaceId) -- Put your desired game id you want to make a server for
local players = Players:GetPlayers() -- Get a list of all players
 
TS:TeleportToPrivateServer(game.PlaceId,servercode,players) -- Actually teleport the players
-- You could add extra arguments to this function: spawnName, teleportData and customLoadingScreen

You wrote “servercode” on the TS:TeleportToPrivateServer should that be just “code”?

Parameters doesn’t have to have any specific text. (most cases)
I wrote servercode so it’s easier for you to understand

ooh soo servercode should be code.

Doesn’t have to be, but you can type “code” if you want.

Just make sure its the second argument

I saw the script in the wiki right now and it doesnt work for me it gives me an error