Overview
Available in: Server Only
This module runs exclusively on the server side. Use Signals or Client Methods to communicate with the client.
Owl - Flags is a modern, reliable feature flag and feature-toggle library built for Roblox. It allows server-side management of dynamic configuration flags, user rollout targeting, whitelisting, blacklisting and cross-server synchronization via DataStoreService and MessagingService.
Key Features
- Cross-Server Synchronization: Instant propagation of flag updates across server instances using Roblox's
MessagingService. - Data Persistence: Automatic persistence to
DataStoreService(OwlFlags_v1), ensuring flag configurations survive server restarts. - Resilient Fallback: Built-in fallback polling loop in case
MessagingServiceexperiences disruptions. - Targeted Rollouts: Consistent user bucket hashing using a stable string hashing algorithm (
stableHash) to seamlessly control percentage-based feature rollouts. - Scope & Access Control: Support for
Public,Private, andSharedflag scopes, along with granular User IDWhitelistandBlacklistchecks. - Trove Lifecycle Integration: Automated cleanup and task handling using Trove.
Types & Data Structures
Defines the visibility scope of a flag:
export type FlagScope = "Public" | "Private" | "Shared"FlagState
Represents the internal state of a feature flag stored in memory and persisted in the DataStore:
export type FlagState = {
Name: string,
Scope: FlagScope,
Enabled: boolean,
RolloutPercent: number,
Whitelist: {[number]: boolean},
Blacklist: {[number]: boolean},
UpdatedAt: number,
Version: number,
}FlagConfig
Configuration structure provided when creating or modifying a flag:
export type FlagConfig = {
Scope: FlagScope?,
Enabled: boolean?,
RolloutPercent: number?,
Whitelist: {number}?,
Blacklist: {number}?,
}Flag Evaluation Logic (IsEnabled)
When OwlFlag.IsEnabled(flagName, player) is evaluated, the module executes the following checks in order:
- Existence Check: Defaults to
falseif the flag is unknown. - Blacklist Check: Immediately returns
falseifplr.UserIdis blacklisted. - Whitelist Check: Immediately returns
trueifplr.UserIdis whitelisted. - Global Toggle: Returns
falseifEnabledis set tofalse. - Rollout Bounds: Returns
trueifRolloutPercent >= 100, orfalseifRolloutPercent <= 0. - Deterministic Hash: Uses
stableHash(flagName, userId)to determine if the player falls within the rollout threshold (0-99).
Comparison: Owl Flags vs Standard Methods
| Feature | Standard DataStores | Roblox Configuration | Owl Flags |
|---|---|---|---|
| Instant Multi-Server Sync | ❌ | ❌ | ✅ (MessagingService) |
| Automatic Persistence | ⚠️ Manual | ❌ | ✅ (DataStoreService) |
| Whitelist / Blacklist Support | ❌ | ❌ | ✅ Built-in |
| Percentage Rollouts | ❌ | ❌ | ✅ Deterministic Hash |
| Event Signals on Updates | ❌ | ❌ | ✅ OwlFlag.Changed |