Skip to content
iKryptonic edited this page May 3, 2026 · 15 revisions

RBXStateMachine

Wiki Pages API Pages Tests Rojo Ready Runtime Dashboard

RBXStateMachine is a Roblox gameplay runtime for building server-authoritative Entities, finite state machines, behavior trees, scheduled jobs, replication pipelines, and a first-class developer dashboard from one cohesive framework.

It is built for teams shipping multiplayer systems, NPC-heavy gameplay, persistent worlds, and any experience where ad-hoc remotes, task.delay, and one-off state logic stop scaling.


πŸ”Ž At a glance

  • What it does β€” boots an Orchestrator-centered runtime that compiles Entities and FSMs, schedules work inside a frame budget, replicates schema-backed state, persists data, and exposes live tooling.
  • Who it's for β€” Roblox developers building authoritative multiplayer gameplay, reusable framework code, large NPC populations, or production debugging workflows.
  • Why it stands out β€” native FSM timing (ScheduleTransition, WaitSpan, Timeout), schema-validated entities, optional persistence, actor-based parallelism, and the ServiceManager dashboard.

πŸš€ Quick links

I want to... Start here
Install and bootstrap the framework Getting Started
Build a tiny working example fast Quick Start
Look up modules and APIs API Reference
Understand the runtime design Architecture
Learn the framework vocabulary Glossary

πŸ—οΈ Architecture diagram

Your game code
(Entity / StateMachine modules)
          β”‚
          β–Ό
Orchestrator
β”œβ”€β†’ Factory + Registry
β”‚   β”œβ”€β†’ BaseEntity
β”‚   β”‚   schema, context, versioning
β”‚   └─→ BaseStateMachine
β”‚       states, transitions, timeouts
β”‚       └─→ BehaviorTree
β”‚           Selector / Sequence
β”œβ”€β†’ Scheduler
β”‚   frame budget + global heartbeat
β”‚   └─→ BaseStateMachine
β”œβ”€β†’ NetworkManager
β”‚   requests, commands, replication
β”‚   └─→ BaseEntity
β”œβ”€β†’ EntityPersistence + DataStoreHandler
└─→ ServiceManager
    9-subsystem dashboard

🌟 Feature highlights

🧠 FSM runtime

πŸ›‘οΈ Entity model

  • Schema-validated properties, staged commits, versioned replication, and persistence hooks.
  • Server-authoritative updates flow through UpdateEntity() instead of ad-hoc remotes.
  • See: API: BaseEntity, Replication Pipeline, Versioning

🌳 Behavior trees

  • Compose Selector, Sequence, Condition, and state-setting nodes around FSM logic.
  • Useful for reusable AI decisions without deeply nested conditionals.
  • See: API: BehaviorTree

⚑ Scheduler and scale

  • Frame-budgeted task execution, priority-aware scheduling, task history, and Actor-backed parallel jobs.
  • Designed for large numbers of agents without giving every system its own uncontrolled loop.
  • See: API: Scheduler, API: ActorPool, Performance Tuning

πŸ–₯️ ServiceManager dashboard

  • Built-in diagnostics for TASKS, FSM, ENTITY, NETWORK, DATASTORE, INSIGHTS, CONSOLE, LOGS, and PROFILER.
  • Snapshot-driven inspection with Z-axis drill-down navigation for live debugging.
  • See: API: ServiceManager, Debugging

🧭 Learning paths

Path Recommended pages
First-time setup Getting Started β†’ Quick Start β†’ Registration Guide
Gameplay authoring Examples β†’ Best Practices β†’ API: BaseEntity β†’ API: BaseStateMachine
Runtime internals Architecture β†’ API: Orchestrator β†’ API: NetworkManager β†’ API: Scheduler
Production hardening Replication Pipeline β†’ Pooling Strategy β†’ Performance Tuning β†’ Production Readiness
Reference lookup API Reference β†’ Glossary β†’ FAQ

βœ… Recommended bootstrap

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local FSM = require(ReplicatedStorage:WaitForChild("RBXStateMachine"))

FSM.Orchestrator:RegisterComponents()

if RunService:IsStudio() then
    FSM.Orchestrator:StartServiceManager()
end

πŸ”— See also

🏠 Home


πŸš€ Getting Started


πŸ—οΈ Architecture


πŸ”§ API Reference


πŸ“š Guides


βš™οΈ Advanced


πŸ› οΈ Development


πŸ“– Reference

Clone this wiki locally