Attempt to index nil with 'Miscellaneous'

Hi there! I was just wondering why this code wont work.

Here is the module script:

local Settings = {}																


Settings.Permissions = {
	
	Creators = {},
	
	Administrators = {},
	
	Moderators = {},
	
}

Settings.Auto_Punished = {
	
	Auto_Banned = {},
	
	Auto_Muted = {},
	
}

Settings.Logging = {
	
	Log_Actions = true,
	
	Discord_Webhook = {""},
	
	Log_Kicks = true,
	
	Log_Bans = true,
	
	Include_Game_Link = true,
	
	Show_Player_Image = true,
	
}

Settings.Miscellaneous = {

	Show_Watermark = true,

}

return Settings```

And here is the code:

```lua
xenith = game.Workspace:FindFirstChild("Xenith Admin v0.0.0")

config = require(xenith.Configuration)

if config.Settings.Miscellaneous.Show_Watermark == false then

xenith.Xenith_Admin_UI:Destroy()

else

xenith.Xenith_Admin_UI.Parent = game.StarterGui

print("|| Xenith Admin ||: Successfully Loaded!")

end```

The error is: 

**Workspace.Xenith Admin v0.0.0.Manager:5: attempt to index nil with 'Miscellaneous'**

Any ideas on how to solve?

Is the Module (Settings). So you should only need to call

config.Miscellaneous
1 Like

thanks lol. i am really dumb sometimes

1 Like

Always glad to help, and your work looks nice. I’m positive you’ll get better as you gain more experience :ok_hand: