Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
sentinelcore avatar

Roblox Performance

  • 492 installs
  • 11 repo stars
  • Updated February 23, 2026
  • sentinelcore/roblox-skills

roblox-performance is a Claude skill that helps Roblox developers optimize game frame rates by applying StreamingEnabled, object pooling, LOD, and MicroProfiler-guided performance fixes.

About

roblox-performance is a Claude skill from sentinelcore/roblox-skills for optimizing Roblox games against frame rate drops, client-server lag, and expensive script loops. The quick-reference table ranks techniques by impact: StreamingEnabled for large open worlds, object pooling for frequent spawn/destroy cycles, caching references outside Heartbeat and RenderStepped loops, preferring task.wait() over deprecated wait(), and choosing MeshParts over Unions for unique shapes. Developers reach for roblox-performance when diagnosing FPS drops, handling large worlds, reducing draw calls, or profiling with MicroProfiler. The skill triggers on optimization requests involving streaming, LOD, object pooling, or expensive loop operations. It provides actionable Luau performance patterns rather than generic game design advice, targeting engineers shipping player-facing experiences that must run smoothly on varied hardware.

  • roblox-performance
  • AI & Agent Building
  • AI-coding skill

Roblox Performance by the numbers

  • 492 all-time installs (skills.sh)
  • +33 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #1,786 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/sentinelcore/roblox-skills --skill roblox-performance

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs492
repo stars11
Last updatedFebruary 23, 2026
Repositorysentinelcore/roblox-skills

How do you optimize Roblox game performance?

Helps with ai & agent building tasks.

Who is it for?

Roblox Luau developers shipping games with FPS drops, large worlds, or expensive Heartbeat and RenderStepped loop patterns.

Skip if: Non-Roblox game engines or greenfield game design tasks without performance profiling or optimization requirements.

When should I use this skill?

User asks to optimize Roblox FPS, reduce lag, fix streaming issues, apply object pooling, LOD, or profile with MicroProfiler.

What you get

Prioritized performance fix list, optimized Luau scripts, and MicroProfiler-guided tuning for client and server frame rates.

  • Prioritized optimization checklist
  • Refactored Luau scripts
  • MicroProfiler diagnosis notes

By the numbers

  • Quick-reference table ranks performance techniques by High and Medium impact tiers

Files

SKILL.mdMarkdownGitHub ↗

Roblox Performance Optimization

Quick Reference

TechniqueImpactWhen to Use
StreamingEnabledHighLarge open worlds
Object poolingHighFrequent spawn/destroy
Cache references outside loopsHighHeartbeat/RenderStepped
task.wait() over wait()MediumAll scripts
MeshParts over UnionsMediumMany unique shapes
LOD (hide at distance)MediumComplex models
Anchor static partsMediumReduce physics budget
Limit PointLightsHighAny scene with many lights

---

StreamingEnabled

Enable for large worlds — engine sends only nearby parts to the client.

-- Studio: Workspace > StreamingEnabled = true
workspace.StreamingEnabled = true
workspace.StreamingMinRadius = 64
workspace.StreamingTargetRadius = 128
  • Parts outside the radius are nil on the client — always guard with if part then.
  • Set Model.LevelOfDetail = Disabled on models that must always be present.
  • Pre-stream an area before a cutscene or teleport:
workspace:RequestStreamAroundAsync(targetPosition, 5) -- 5s timeout

---

Hot-Path Loop Optimization

RunService.Heartbeat and RenderStepped fire every frame (~60×/sec). Keep them lean.

Bad — searching the hierarchy every frame

RunService.Heartbeat:Connect(function()
    local char = workspace:FindFirstChild(player.Name)
    local humanoid = char and char:FindFirstChild("Humanoid")
    if humanoid then humanoid.WalkSpeed = 16 end
end)

Good — cache references once, do work only when needed

local humanoid = nil

Players.LocalPlayer.CharacterAdded:Connect(function(char)
    humanoid = char:WaitForChild("Humanoid")
end)

RunService.Heartbeat:Connect(function(dt)
    if not humanoid then return end
    humanoid.WalkSpeed = 16  -- cached reference, no search
end)

Rules:

  • Cache game:GetService() and part references outside the loop.
  • Never call FindFirstChild, GetChildren, or GetDescendants inside Heartbeat.
  • Throttle work that doesn't need every frame:
local TICK_INTERVAL = 0.5
local elapsed = 0

RunService.Heartbeat:Connect(function(dt)
    elapsed += dt
    if elapsed < TICK_INTERVAL then return end
    elapsed = 0
    -- expensive work here, runs 2×/sec instead of 60×/sec
end)

---

task Library vs Legacy Scheduler

Always use taskwait() and spawn() throttle under load and are deprecated.

LegacyModern
wait(n)task.wait(n)
spawn(fn)task.spawn(fn)
delay(n, fn)task.delay(n, fn)
coroutine.wrap(fn)()task.spawn(fn)

---

Object Pooling

Reuse instances instead of creating and destroying them every frame.

-- ObjectPool ModuleScript
local ObjectPool = {}
ObjectPool.__index = ObjectPool

function ObjectPool.new(template, initialSize)
    local self = setmetatable({ _template = template, _available = {} }, ObjectPool)
    for i = 1, initialSize do
        local obj = template:Clone()
        obj.Parent = nil
        table.insert(self._available, obj)
    end
    return self
end

function ObjectPool:Get(parent)
    local obj = table.remove(self._available) or self._template:Clone()
    obj.Parent = parent
    return obj
end

function ObjectPool:Return(obj)
    obj.Parent = nil
    table.insert(self._available, obj)
end

return ObjectPool
-- Usage
local pool = ObjectPool.new(ReplicatedStorage.Bullet, 20)

local function fireBullet(origin)
    local bullet = pool:Get(workspace)
    bullet.CFrame = CFrame.new(origin)
    task.delay(3, function() pool:Return(bullet) end)
end

---

Level of Detail (LOD)

Built-in: Set Model.LevelOfDetail = Automatic — engine merges distant parts into an imposter mesh automatically.

Manual distance-based LOD:

-- LocalScript
local INTERVAL = 0.2
local LOD_DISTANCE = 150
local elapsed = 0

RunService.Heartbeat:Connect(function(dt)
    elapsed += dt
    if elapsed < INTERVAL then return end
    elapsed = 0

    local dist = (workspace.CurrentCamera.CFrame.Position - model.PrimaryPart.Position).Magnitude
    local visible = dist < LOD_DISTANCE
    for _, v in model:GetDescendants() do
        if v:IsA("BasePart") then
            v.LocalTransparencyModifier = visible and 0 or 1
        end
    end
end)

---

Reducing Draw Calls

  • Merge parts that share a material into one MeshPart (export from Blender as .fbx).
  • MeshParts batch better than CSG Unions (Unions re-triangulate at runtime).
  • Reuse materials — 10 parts sharing SmoothPlastic costs far less than 10 unique textures.
  • Use TextureId on a single MeshPart instead of stacking Decals on many parts.

---

Profiling with MicroProfiler

1. Press Ctrl+F6 in-game to open MicroProfiler. 2. Press Ctrl+P to pause and inspect a single frame. 3. Look for wide bars in heartbeatSignal (Lua), physicsStepped (physics), or render (GPU). 4. Label your own code:

RunService.Heartbeat:Connect(function()
    debug.profilebegin("MySystem")
    -- your code
    debug.profileend()
end)

---

Common FPS Killers

CauseFix
Thousands of individual partsMerge into MeshParts
Unanchored static geometryAnchored = true on anything that never moves
Many PointLight / SpotLight instancesLimit to ~10–20 dynamic lights per area
High-rate ParticleEmittersLower Rate and Lifetime; disable when off-screen
wait() under heavy loadReplace with task.wait()
FindFirstChild chains inside HeartbeatCache on load
StreamingEnabled off on large mapsEnable it
Model.LevelOfDetail = Disabled everywhereUse Automatic where safe

---

Common Mistakes

MistakeFix
workspace:FindFirstChild every frameCache reference on character/model load
Destroying and re-creating bullets/effectsUse an object pool
wait() in tight loopstask.wait()
All parts with unique materialsStandardize to a small set of shared materials
ParticleEmitters enabled off-screenDisable Enabled when particle source is not visible
Physics on decorative partsAnchored = true

Related skills

How it compares

Use roblox-performance for Luau-specific Roblox engine tuning; general web performance skills do not cover StreamingEnabled or MicroProfiler workflows.

FAQ

What high-impact optimizations does roblox-performance recommend?

roblox-performance ranks StreamingEnabled and object pooling as high-impact fixes for large worlds and frequent spawn/destroy cycles. Caching references outside Heartbeat and RenderStepped loops also delivers high impact on frame rates.

When should developers invoke roblox-performance?

roblox-performance triggers on Roblox optimization requests involving FPS drops, server or client lag, large worlds, streaming, draw calls, object pooling, LOD, MicroProfiler profiling, or expensive loop operations in Luau scripts.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.