Why does this not work

I got a module script for my admin system that is supposed to print something if debug mode is enabled. It’s won’t tho?

local setting = require(game:GetService("ServerScriptService"):WaitForChild("Kore"):WaitForChild("Settings"))
local main = {}

game.Players.PlayerAdded:Connect(function(plr)
	if setting.DebugMode == true then
		print("Script 'Kore' loaded")
	end
end)

return main

Settings script:

local setting = {}

setting.DeveloperGetsAdmin = false -- Does the developer get admin?
setting.DebugMode = true -- Enable debug mode (basically prints every actions incase there is a error) - (auto enabled due to Kore's beta)


return setting

I would print before the if statement and print before the connection. This would check for 2 things:

  1. Is setting being required?
  2. Is the playeradded connection working?

If those two print, then the issue is the DebugMode value.

1 Like