My code doesn’t seem to teleport the player in the correct reserved server. The target im trying to teleport into is a reserved server but running this teleports me into an empty reserved server.
local success, err, _, placeId, jobId = pcall(function()
return TeleportService:GetPlayerPlaceInstanceAsync(targetId)
end)
print(success, err, placeId, jobId)
if success then
local success, accessCode = pcall(function()
return ServerAccessCodes:GetAsync(tostring(targetId))
end)
print(success, accessCode, tostring(targetId))
if success and accessCode then
local TeleportOptions = Instance.new("TeleportOptions")
TeleportOptions.ReservedServerAccessCode = accessCode
local success, result = pcall(function()
return TeleportService:TeleportAsync(placeId, {player}, TeleportOptions)
end)
print(success, result)
end
end
i might be wrong but teleportAsync teleports to a public server and public servers don’t have reserved ( i think) to solve this you should use teleport to private server
Have you tested to see if the access codes are the same for both players. E.g the player your trying to get to has the same access code as the one that was saved