Why does my teleport to private server code not working?

Problem: I get a 769 error when I click teleport.

local TS = game:GetService("TeleportService")

startCallEvent.OnServerEvent:Connect(function(player)
--local generatedServerId = generateServer()
TS:TeleportToPrivateServer(game.PlaceId, "kaSKK6CGomz", {player})

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

end)
 local code = TS:ReserveServer(game.PlaceId)
 
 TS:TeleportToPrivateServer(game.PlaceId, code, {player})

The code must be a generated code for a reserved server.

Yeah, I already used the generated code.

1 Like

every time you use teleportserver:reserveserver() a new code is made

I’m aware of that and that isn’t answering my question.

I already generated a code once, and I plan to reuse that access code to enter a reserved server, but it does not seem to work.

When a server shuts down, its code is unusable and a server shuts down when the devs use shut all games or no players are inside

local TS = game:GetService("TeleportService")

local code = TS:ReserveServer(game.PlaceId)
startCallEvent.OnServerEvent:Connect(function(player)
--local generatedServerId = generateServer()
TS:TeleportToPrivateServer(game.PlaceId, code, {player})

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

end)

try this code to check if the error is coming from an invalid code or no.

That is a misleading information.

Reserved Server Ids are valid forever

my mistake then because i just learnt

The thing is I already generated a code, which is “kaSKK6CGomz” and I want people to reuse it, just very curious why it errors?

have you tested this first tho?

local TS = game:GetService("TeleportService")

local code = TS:ReserveServer(game.PlaceId)
startCallEvent.OnServerEvent:Connect(function(player)
--local generatedServerId = generateServer()
TS:TeleportToPrivateServer(game.PlaceId, code, {player})

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

end)

tell me if it works, so I can understand the issue further.

Yes, it works very very very well.

ConnectionError | Documentation - Roblox Creator Hub also found this

See the code?
I have it copied from the textbox:
P-UAQGNo4NibFsl0HjC4wHMvZh3YYDFNk2GuEEnzhqrUpVt3AQAAAA2

I want to reuse that.

Alright as I can see the code is very short when it shouldnt be that short.

Have you put kaSKK6CGomz or P-UAQGNo4NibFsl0HjC4wHMvZh3YYDFNk2GuEEnzhqrUpVt3AQAAAA2 ?

OK but that’s what the game generated.

I have put the new one, so just “UAQGNo4NibFsl0HjC4wHMvZh3YYDFNk2GuEEnzhqrUpVt3AQAAAA2”.