Module script as data base problems

Hello, i was working with module scripts as data base before, but now when i try same i get this on output:
C__Users_Aleksa_Desktop_random terrain2.rbxl - Roblox Studio 8_11_2020 11_25_32 AM
module script:

local dataBase = {

	["Shack"]= {
		["cost"] = 0,
		["CanBeBuilt"] = false,
		["PeopleCount"] = 2,
		["types"] = 3
			},


} 

return dataBase

Server script

database2=require(game.ReplicatedStorage.ObjectStats)

print(database2["Shack"]) 

Is something wrong in scripts or module scripts have changed?
Thank you!

I don’t really understand you problem. What you’re doing is working. Basically you got your dataBase table and you print out your Shack table inside of it. If you try to access the values inside Shack then simply do this.

database2["Shack"]["cost"]
1 Like

I was stupid to forget this, thanks mate for helping.
But wait, is there way to make script list all values that are in shacks?

Sure, just do this.

for index, v in pairs(database2["Shack"]) do
    print(index, v)
end
1 Like

Perfect, i would like to put this as second solution but i cant…
You helped a loot!

Cheers from Serbia