Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

how do i make a function that says every key and value in a table?

ive been trying to figure this out for a while now and im wondering if anyone can help me with it

1 answer

You can superficially read a Table's structure through a generic pairs iteration.

local function ExposeTableData(Table : {[any] = any})
	for Index, Value in pairs(Table) do
		print(tostring(Index) .. ": "..tostring(Value))
	end
end

However, ROBLOX's new expressive output can now display the complete layout simply through print.

3 comments

0

Is this an update, where you can simply print(table)?

0

Yes, it has been a new feature for quite some time. Your output should appear visibly different from the last, did you not notice?

0

You can call that function anywhere that executes code.

This discussion is preserved as it was. New answers, comments, and votes are closed.