This skill helps an agent write Luau code for Roblox experiences. It starts from the project setup (Rojo files, selene config, type-check mode), decides which container the code belongs in, and builds Instances and connections so they clean up after themselves.
It carries a table of where each script type runs, patterns for per-player setup, owned connections, frame loops and frozen shared config, and a list of gotchas such as deferred signals, nil on the client after join and legacy scheduling globals.
What You Get
- A seven-step workflow from reading the Rojo and selene setup to a play-test check
- A table of containers that shows where each script type runs and what belongs there
- Luau patterns for per-player setup that covers early joiners, connections owned by their object and a frozen shared config module
- A gotchas list covering deferred signal ordering, nil objects on the client, legacy wait and spawn, and type versus typeof
Common Use Cases
- Finding why a LocalScript never runs because it sits in the wrong container
- Fixing a client script that gets nil for an object right after joining
- Replacing wait, spawn and delay with the task library
- Adding type annotations and running selene and luau-lsp before a play test
What Makes It Unique
The skill treats placement as the first decision: it checks RunContext and the container table before it writes logic. It gives rules specific to current Roblox behavior, such as deferred signals changing handler order and module state being separate per context, and it points to sibling skills for remotes, saving and place edits so its own scope stays small.
Under The Hood
The agent loads the SKILL.md and, when needed, one reference on client and server replication, WaitForChild, Bindables, attributes, tags and Studio test modes. It reads project files such as Rojo project files, selene.toml and .luaurc, edits Luau source, and can run selene, rojo sourcemap and luau-lsp on the command line. With a connected Roblox Studio MCP server it starts play, runs Luau in the matching datamodel and reads the console. Without it, it asks you to press Play and paste the Output. Documentation URLs are named for re-checking APIs, and nothing is fetched during normal use.