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

Using Configurations Values with a Module Script?

I’m attempting to use a configuration folder with my module script but what I have in the module script does not end up in the configuration value.

I have this script at the bottom of my configurations:

Settings.Configurations = {
     Test1 = “blah blah”,
     Test2 = true
}

Then the configurations folder under the module script with one string value and one book value, any help?

4 comments

0

check errors

0
  1. you're using curly quotes
0
  1. iirc, the correct syntax is ["Test1"] = "blah blah"
0

wrong TTChaos

1 answer

if that is everything in your module then youre missing a critical part, it should look like this

local Settings = {}
Settings.Configurations = {
	Test1 = "blah blah",
	Test2 = true
}

return Settings

then in the script youre requiring the module with, should look something like this

local settings = require(path to module)
local configs = settings.Configurations
--then you can access the content
local firstData = configs.Test1
print(firstData)

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