Internal iterator state, not the source table. It must be passed straight through to the generic for loop; capturing only the first return value and iterating over that will error.
Example
Creates a table and prints its contents in random order
local tab ={"a", "b", "c", "d", "e", "f"}for k, v inRandomPairs(tab) doprint(v)
end