Roblox SDK & Integration
In-depth developer reference for the ShadowConfig Luau SDK, module scripts, and API methods.
Overview
The ShadowConfig Roblox SDK consists of server-side Luau scripts that connect your Roblox game servers to the ShadowConfig Cloud API. It handles config caching, remote command listening via MessagingService, automated background logging, and DataStore syncing.
Installation & Setup
- In Roblox Studio, navigate to Game Settings → Security and turn ON:
Allow HTTP RequestsEnable Studio Access to API Services
- Copy the bootstrap script from the Roblox SDK tab in your dashboard.
- Create a new
Script(not ModuleScript) inServerScriptServicenamedShadowConfig. - Paste the copied script content into the script and save your place.
API Reference
ShadowConfig.GetAsync(key)
Retrieves a cloud config variable by key name from the local server cache.
local ShadowConfig = require(game:GetService("ServerScriptService"):WaitForChild("ShadowConfigModule"))
local goldMult = ShadowConfig.GetAsync("goldMultiplier") or 1.0
print("Current Gold Multiplier:", goldMult)ShadowConfig.GetAllConfigs()
Returns a key-value dictionary containing all active variables for the game universe.
ShadowConfig.OnConfigChanged(callback)
Fires whenever variables are updated live from the web dashboard or GitHub Sync.
ShadowConfig.OnConfigChanged(function(newConfigs)
print("Configs updated live!")
if newConfigs.doubleXpEnabled ~= nil then
workspace.XPBanner.Visible = newConfigs.doubleXpEnabled
end
end)Best Practices
- Server-Only Execution — Never place the main ShadowConfig bootstrap script in client containers (like
StarterPlayerScripts). Keep core SDK logic inServerScriptService. - Fallback Values — Always supply default fallback values when reading config keys to prevent nil errors if a variable is modified or deleted.
- Rate Limiting — The SDK caches variables locally and auto-refreshes based on your plan's cache TTL, so calling
GetAsync()inside game loops is safe and performant.
