Getting all the functions in a table and printing them out

I’m making a custom admin script, and just like every other one, I want a /help command that lists out every command in a table. I know how to do everything, except the actual “getting all the commands” part.

I’ve tried doing this:

print('All admin commands found from module')
print('------------------------------------')
for _, v in ipairs(Commands) do
	print(tostring(v).. '\n')
end

…but that just prints nothing, other then the text in the first 2 lines.

Any ideas? I couldn’t find anything online.

Could u show how Commands look like, the other script.

Just reminding you that ipairs stops at the first nil value and only traverses integer keys starting from 1.
Like @AGIT_Games mentioned, it would be very useful to post the contents of your Commands table.

A command looks like this:

local commands = {
    example = function(Sender,Arguments)

    end;
}

return commands

I changed it to pairs, and now it spits out gibberish:
image

print i instead of v, v is the function, not the key