I have a ModuleScript that’s supposed to hold settings and other stuff, but it’s mostly for settings. The problem is with the :ChangeSetting() function, it always says that there’s no setting with any name I put inside the arguments of it, even though a setting by that name DOES exist.
Here’s the ModuleScript:
local module = {}
local _settings = {
["Hitboxes"] = false;
["Headlock"] = false;
}
function _s:ChangeSetting(SettingName, NewValue)
if table.find(_settings, SettingName) or _settings[SettingName] then
_settings[SettingName] = NewValue
print(_settings[SettingName])
else
return warn("'"..SettingName.."'".." is not a valid setting")
end
end
function _s:GetSettings()
return _settings
end
return module
Help a brotha out…