what about the other options?
also can you do print(destinationName)
returns Server-04
returns the job id in the image above
ive also confirmed the job id matches the one my alt is in
Also is your game public?
and this option is enabled?
Public yes, third party teleports not yet, let me try that now.
Unfortunately, still does not work.
Oh I forgot, TeleportToPlaceInstance wont work if you are using ReserveServer
Ah. Are there any alternatives?
Does it work for job IDs?
character limit again
Yes
Okay I’ll give it a go.
qwerty
Where would I put the job id? I put it in reserve server access code but it still generates the same error
You can do like this, as given in the DevHub Article
local DataStoreService = game:GetService("DataStoreService")
local TeleportService = game:GetService("TeleportService")
local ServerAccessCodes = DataStoreService:GetDataStore("ReservedServerAccessCodes")
-- Teleport the player to a reserved server
local teleportOptions = Instance.new(“TeleportOptions”)
teleportOptions.ShouldReserveServer = true
local teleportResult = TeleportService:TeleportAsync(game.PlaceId, {player}, teleportOptions)
-- Save the ReservedServerAccessCode from the TeleportResult instance
ServerAccessCodes:SetAsync(teleportResult.PrivateServerId, teleportResult.ReservedServerAccessCode)
-- To retrieve the access code (can only be done from in the reserved server)
local accessCode = game.PrivateServerId ~= "" and ServerAccessCodes:GetAsync(game.PrivateServerId)
What part goes in what? Does the
ServerAccessCodes:SetAsync(teleportResult.PrivateServerId, teleportResult.ReservedServerAccessCode)
go in the teleporter game or the reserved server??
Why do you even see the data store? Roblox just added it in their tutorial
This is what you need xd
local teleportOptions = Instance.new(“TeleportOptions”)
teleportOptions.ShouldReserveServer = true
local teleportResult = TeleportService:TeleportAsync(game.PlaceId, {player}, teleportOptions)
This is incorrect.
You can’t have teleport options with ReservedAccessCode and ServerInstanceId (AKA jobId). This is stated here: TeleportOptions | Roblox Creator Documentation
Unfortunately you can’t access a reserved server with jobId. To make things worse, multiple servers can have the same ReservedServerAccessCode and PrivateServerID. This is because Xbox players with cross play disabled are teleported to a new server with the same info. More details here under “limitations”: TeleportService | Roblox Creator Documentation
However in theory, if your game is not on Xbox, then hopefully PrivateServerID and ReservedServerAccessCode is unique to each server. But only if xbox consoles are not allowed to play.