Not joining correct reserved server

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’m still in need for this. Currently still having trouble.

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

I’ve tried this but it does the same

hmm i can mabye re write a code for you. how does it work ( like you press a button to teleport?)¨

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

Yes, the access code is the same but teleports me to a new reserved server.

I think you need an error message Param after success here.

The accessCode returns the access code when it successfully gets it.

Yes

So you tested it and it printed the access code right?

Gotcha but I’m pretty sure the error message is supposed to come after success. Maybe it is thinking error message is the access code?