Hello, I’m trying to get table contents of a table within a module script. When I am calling the table it only returns this: table: 0x7217ba0a019611c2. How could I make it return like a “Normal” Table. Plane = {Somethings = “Something”} etc. I’ve tried to do some searching but I don’t completly understand it.
Calling Script
local Wable = require(game:GetService("ReplicatedStorage"):WaitForChild("ModuleScript"))
print(Wable)
Not exactly what I tried to look for but is there a way to print the whole table, if I had several variables in the table. For example if it was module = {Hello = “Hellos”, MyName = “RobloxCoDev”, Yohaj = “Yobah”}
Then print it out as like that, like it would with a normal table in a server script.
I think you are not able to print table like this in a server script… Pretty sure that there is not a way to print a variable’s name, but correct me if I’m wrong.
If you wanna know all the values from a table use for pairs, I pairs and pairs
Example:
local Table = {A = "Hello", Ka = "Hi", Hj = "Goodbye"}
-- if the table is in a module then replace by: local Table = require(MODULE).TABLE
for Key,Value in pairs (Table) do
print(Key)
print(Value)
end
--[[ output:
A
Hello
Hj
Goodbye
Ka
Hi
]]