MCPInstall

roblox-performance

Performance diagnosis and optimization - MicroProfiler, Script Profiler, Developer Console, Scene Analysis, Luau heap and memory categories, memory leaks, network/replication cost, rendering and physics cost, streaming, native codegen, Parallel Luau with Actors. Use when a game lags, stutters, drops FPS, crashes on mobile, has high ping, or before optimizing hot code.

Installs
469
Last 24h
+23
Trending rank
#5256
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/el4cteo/roblox-skills --skill roblox-performance
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads roblox-performance automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Roblox performance

Measure before optimizing. Identify whether the bottleneck is server compute, client compute (CPU/GPU), memory, network, or load time, then use the matching tool.

Tools

ToolOpenUse for
Developer ConsoleF9 (in game)Errors, server/client memory by category, network, script activity. Works in live servers.
MicroProfilerCtrl+Alt+F6 (⌘⌥F6); Dev Console for serverPer-frame timing; spikes; dump a frame for detail.
Script ProfilerStudio / Dev ConsoleWhich functions consume Luau time (sampling).
Luau heap snapshotsDev Console → Memory → Luau HeapWhat tables/closures/instances are held and by what (leaks).
Scene AnalysisStudioScript memory, unparented instances (leaks), instance composition, audio/animation memory, triangles. Also SceneAnalysisService via Studio MCP.
Performance Stats / Debug StatsCtrl+Alt+F7 / Shift+Ctrl+F1–F5Live CPU/GPU/memory/network overlays.
Network SimulatorStudio Device Simulator toolbarTest with latency, jitter, packet loss (3G/4G/Wi-Fi profiles).
Performance dashboardCreator HubLive aggregate FPS, server heartbeat, memory, crash rates by device.

Label your own code in the MicroProfiler and memory views:

--!strict
local RunService = game:GetService("RunService")

debug.setmemorycategory("EnemyAI") -- memory allocated by this thread is attributed to "EnemyAI"

RunService.Heartbeat:Connect(function(_deltaTime)
	debug.profilebegin("EnemyAI.think") -- shows as a labeled bar in the MicroProfiler
	-- ... work ...
	debug.profileend()
end)

Targets

  • Client: 60 FPS on mid-range phones (≈16.6 ms/frame); many players are on low-end Android.
  • Server: heartbeat near 60 Hz; Stats (workspace:GetRealPhysicsFPS(), Dev Console Server Stats).
  • Memory: mobile clients crash from OOM first. Keep client memory well under ~1–1.5 GB on low-end devices; watch PlaceMemory, LuaHeap, GraphicsTexture, Sounds, Animation categories.

Most common problems → fixes

SymptomUsual causeFix
Memory grows over timeLeaked connections, tables keyed by players/instances, destroyed-but-referenced instances, unparented instancesDisconnect/clean up per player & per character; clear tables on PlayerRemoving; use Scene Analysis "unparented instances" and heap snapshots.
Server lag with many playersPer-player loops each frame, while true do task.wait() end loops, heavy remote handlers, physics of many unanchored partsEvent-driven code, one scheduler loop, throttled think rates, anchor static parts, server-own fewer assemblies.
Client FPS dropsToo many parts/draw calls, shadows from many lights, transparency/particles overdraw, per-frame UI updatesMerge/instance meshes, CastShadow = false on small parts, fewer shadowed lights, limit particles, update UI on change only.
Spikes every N secondsAutosave/GC bursts, synchronized loops across players, big Clone()sStagger with random offsets; pool objects; spread work across frames.
High ping / rubber bandingRemote spam, large payloads, replicating many property changesBatch, delta-compress, throttle; tween on clients; see roblox-networking.
Long join timesHuge place, many unique assets, no streamingStreaming, SLIM LOD, fewer unique meshes/textures, ContentProvider:PreloadAsync only for critical assets.

Luau hot paths

  • Cache services, instances, and RaycastParams outside loops; avoid FindFirstChild/GetDescendants per frame. Replace GetDescendants scans with tags (CollectionService) or maintained sets.
  • Use deltaTime from Heartbeat/PreSimulation rather than task.wait() loops for per-frame work.
  • Avoid creating closures/tables per frame in hot loops; reuse buffers with table.clear.
  • --!native (whole script) or @native (per function) for math-heavy code; typed parameters help the native compiler. Don't blanket-enable: compile time and a global native-code memory limit.
  • --!optimize 2 is how Roblox compiles live games already; don't rely on Studio timings for micro-benchmarks.

Rendering and assets

  • Parts: fewer, larger parts; MeshParts with shared MeshId are instanced (cheap); unions (PartOperation) can be expensive — check triangle counts in Scene Analysis.
  • RenderFidelity = Automatic/Performance for detailed meshes; CollisionFidelity = Box/Hull for decorative meshes; CanCollide/CanQuery/CanTouch = false for pure decoration.
  • Lights: limit shadow-casting PointLight/SpotLight/SurfaceLight; limit ParticleEmitter.Rate and particle size (overdraw); Beam/Trail counts.
  • Textures/images: reuse, keep resolutions reasonable (1024² max for most); SurfaceAppearance sparingly.
  • Enable streaming (roblox-architecture), Model.LevelOfDetail = SLIM for static models, and let StreamOutBehavior = Opportunistic free memory.

Physics

  • Anchor everything that doesn't need to move. Welded decorative parts on moving assemblies add cost.
  • Fewer, simpler collisions (CollisionFidelity, collision groups to skip pairs); CanTouch = false where Touched isn't needed.
  • Avoid setting CFrame of unanchored parts every frame; use constraints or anchor + CFrame.
  • workspace:BulkMoveTo(parts, cframes, Enum.BulkMoveMode.FireCFrameChanged) to move many anchored parts.
  • Adaptive timestepping (PhysicsSteppingMethod = Adaptive) reduces physics CPU.

Parallel Luau

Scripts under different Actor instances can run in parallel:

--!strict
-- Script parented under an Actor (one Actor per logical unit, e.g. per NPC group or chunk).
local RunService = game:GetService("RunService")

local results: { number } = {}

RunService.Heartbeat:ConnectParallel(function(_deltaTime)
	-- Parallel phase: read-only access to most instances, pure computation, thread-safe APIs (raycasts).
	for i = 1, 100 do
		results[i] = math.noise(i / 10, os.clock())
	end
	task.synchronize()
	-- Serial phase: write to instances, fire events, call thread-unsafe APIs.
end)
  • task.desynchronize() / task.synchronize() switch phases; ConnectParallel starts in parallel.
  • Scripts in the same Actor run serially relative to each other: split work across many Actors.
  • Can't require or modify most instances while desynchronized. Communicate with Actor:SendMessage / BindToMessageParallel or SharedTable (SharedTableRegistry).
  • Good fits: raycast validation, procedural generation, pathfinding-adjacent math, large simulations. Bad fits: tiny tasks (sync overhead), instance-heavy work.

Profiling walkthrough and memory-leak hunting: references/profiling.md.

Related skills

roblox-architecture (streaming), roblox-networking (bandwidth), roblox-physics, roblox-npc-ai, roblox-studio-mcp (Roblox's rbx-perf-profiling/scene analysis via MCP).

FAQ

What does the roblox-performance skill do?

Performance diagnosis and optimization - MicroProfiler, Script Profiler, Developer Console, Scene Analysis, Luau heap and memory categories, memory leaks, network/replication cost, rendering and physics cost, streaming, native codegen, Parallel Luau with Actors. Use when a game lags, stutters, drops FPS, crashes on mobile, has high ping, or before optimizing hot code.

How do I install roblox-performance?

Run npx skills add https://github.com/el4cteo/roblox-skills --skill roblox-performance in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/roblox-performance/ (personal) or .claude/skills/roblox-performance/ (project).

Which AI agents can use roblox-performance?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is roblox-performance safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains roblox-performance?

It is published by el4cteo in el4cteo/roblox-skills. It has 469 recorded installs.

More from el4cteo/roblox-skills

View all →

roblox-world-building

el4cteo/roblox-skills

Building worlds with code - parts, models and pivots, materials, Lighting (LightingStyle, Atmosphere, post-processing), day/night, Terrain API, in-game CSG and destruction (GeometryService Subtract/Union/Fragment), ProceduralModel, EditableMesh/EditableImage, particles/beams/trails/highlights. Use when creating maps, environments, lighting, destructible objects, procedural levels, or visual effects.

Backend & APIs487 installs

roblox-ui

el4cteo/roblox-skills

Responsive cross-platform UI - ScreenGui and safe areas (ScreenInsets), Scale vs Offset, UIListLayout flex/UIFlexItem, constraints, StyleSheets/tokens/themes, RichText, gamepad/touch navigation, UIDragDetector, CanvasGroup, tweens, BillboardGui/SurfaceGui, React-lua/Fusion/Vide. Use when building HUDs, menus, shops, inventories, or fixing UI that breaks on mobile, console, or other screen sizes.

Frontend & Design482 installs

roblox-luau

el4cteo/roblox-skills

Modern, type-safe Luau for Roblox, covering --!strict and the new type solver, generics, string interpolation, if-expressions, task library, require-by-string, module/OOP patterns, error handling with retries, buffer/vector, and legacy APIs to avoid. Use when writing, refactoring, or explaining any Roblox script, fixing type errors, or modernizing old Lua code.

roblox-testing

el4cteo/roblox-skills

Open the skill to read its SKILL.md instructions.

Testing & QA469 installs

roblox-game-systems

el4cteo/roblox-skills

Recipes for common systems built on server authority - currency service and leaderstats, XP/levels, round loops with intermission and teams, validated melee/ranged combat, inventory and tools, soft-currency shops, obby checkpoints, daily rewards, pets. Use when implementing or reviewing gameplay systems such as rounds, combat, weapons, inventories, shops, currencies, or progression.

Media & Creative467 installs

roblox-security

el4cteo/roblox-skills

Anti-exploit design - never trust the client, validate every remote argument (NaN, spoofed instances, strings), rate limiting, ProximityPrompt/ClickDetector abuse, network ownership, movement and hit validation, economy/trade duplication, code confidentiality, secure teleports, heuristics, Ban API. Use when writing server handlers for client input, combat/economy/trading, or reviewing for exploits.

Security465 installs

Popular code quality & workflow skills

View category →

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.