Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Scenario Roblox luau

For writing, reviewing or debugging Luau in a Roblox experience.

In detail

Use when writing, reviewing or debugging Luau in a Roblox experience: task.spawn vs task.defer vs task.wait, replacing wait() or spawn(), Deferred events and SignalBehavior, handlers running in the wrong order or not at all, 'attempt to yield across metamethod/C-call boundary', --!strict and the new type solver, typed classes and metatables, Destroy and cleanup, 'server memory keeps growing' or memory leaks, Parallel Luau with Actors and SharedTable, 'not safe to write in parallel', --!native or 'make this script faster', buffers, coroutines.

Safety check

  • Script runs other programs or code: scripts/rbx_luau.py line 24

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: scenario-roblox-luau
description: "Use when writing, reviewing or debugging Luau in a Roblox experience: task.spawn vs task.defer vs task.wait, replacing wait() or spawn(), Deferred events and SignalBehavior, handlers running in the wrong order or not at all, 'attempt to yield across metamethod/C-call boundary', --!strict and the new type solver, typed classes and metatables, Destroy and cleanup, 'server memory keeps growing' or memory leaks, Parallel Luau with Actors and SharedTable, 'not safe to write in parallel', --!native or 'make this script faster', buffers, coroutines."
license: MIT
---

# Roblox Luau Engineering

Roblox Studio (October 2026 build) on macOS, driven through the scenario-roblox-expert toolkit.

Expert Luau here means code that stays correct under Deferred events and the task scheduler,
type-checks on both solvers, releases everything it creates, and earns each optimization with a
number measured on this build. Prove behavior in a playtest data model instead of reasoning from
Immediate-era habits.

If a sibling skill named here is missing from your available skills, load it with `skill_get`
(Scenario MCP) or ask the user to install it (https://github.com/scenario-labs/skills#install);
unattended, proceed from tool schemas and flag the gap.

**REQUIRED BACKGROUND:** scenario-roblox-expert (channels, review loop, toolkit, current-Roblox
traps).

## Stance (the expert delta)

1. **`task.spawn` is not concurrency.** It runs the body up to its first yield before the caller
   continues (Crusherfire). Use `task.defer` for "after this step": a queue that keeps call order.
   `task.wait()` and `task.delay(0)` resume at the next Heartbeat: the same frame from
   PreSimulation, the next frame from Heartbeat (Crusherfire; measured 0.07 ms vs 16.4 ms).
2. **Write Deferred-safe code.** Handlers run at the next resumption point, never inside `:Fire()`
   or a property set (deferred events docs). Nested fires run in queue order, a listener connected
   inside a handler misses fires from the same step, and `Destroying` or `CharacterRemoving`
   handlers see `Parent` nil (Crusherfire; all measured). Read state inside the handler, use
   `:Once()`, and capture what cleanup needs before `Destroy`. Deferred alone cut one game's frame
   time from 6 to 8 ms to 4 to 5 ms (Drew Hamilton, RDC 2026).
3. **Yield only where it is legal and cheap.** Never yield in `__index` or other metamethods,
   `table.sort` comparators or `gsub` callbacks: "attempt to yield across metamethod/C-call
   boundary". Never yield in per-frame handlers: `task.wait(0.25)` in Heartbeat stacked 16 threads
   in 1 s [added, measured]. `pcall` is no fix: a failed `task.wait` under `pcall` left its thread
   registered with the scheduler [added, measured].
4. **Type for both solvers.** New modules start `--!strict`. Define methods as
...

From scenario-labs's repository, MIT licence.

Related skills

  • Checked

    Game Audio Mixing

    Sets up game audio buses, volume sliders, music ducking and adaptive music for Godot, Unity or FMOD.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game camera tuning

    Builds and tunes follow, orbit and first person game cameras in Godot or Cinemachine so they stop jittering.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game Enemy AI

    Designs enemy AI with perception, pathfinding and steering so enemies chase fairly and never get stuck.

    by gamedev-skills 13k
    8/101 credit
  • Checked

    Game Loop and Timing

    Makes movement, timers and physics behave the same at any frame rate in Unity, Godot, Bevy and web games.

    by makifbaysal 123
    7/101 credit
  • Checked

    Game Security Review

    Reviews Unity, Godot and Unreal code for cheats that hurt other players, purchase exploits and unsafe save files.

    by makifbaysal 123
    7/101 credit
  • Checked

    Roblox Game Structure

    Helps you organise a Roblox game's client and server code, data flow and streaming so it stays secure.

    by EL4CTEO 169
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added