Gojiberry AI
AI agents that find and contact high-intent leads for you
Try Gojiberry free →
Hermes Agent
Run your Hermes agent, fully managed
Launch on Hostinger →
Hostinger VPS
Spin up a VPS in one click, 20% off
Launch on Hostinger →
Firecrawl
Crawl and scrape any site into clean data
Try Firecrawl free →
Runable
One AI agent to build, run, and grow your business
Try Runable free →
Context.dev
One API to scrape, enrich, and extract the web
Start building free →
Jotform
Forms, workflows, and AI Agents for your team
Try Jotform free →
Runable
One AI agent to build, run, and grow your business
Try Runable free →
OpenClaw
Deploy a managed OpenClaw agent in 60 seconds
Launch on Hostinger →
Sponsor here
9/10 sponsor slots taken — 1 left
Claim it →
Claude Market
Menu
SkillsMCPPluginsMarketplacesNewsletterSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Claude Market
SkillsMCPPluginsMarketplacesNewsletterSubmit MCPSkillPluginMCPMCP, plugin, or skillAdvertise
Skills/gamedev-skills/awesome-gamedev-agent-skills/roblox-luau
roblox-luau logo

roblox-luau

gamedev-skills/awesome-gamedev-agent-skills
869 installs462 stars
Run it on Hostinger, 20% off →Your friend gets 20% off too, using this linkFree API →|View on GitHub|Create your own skill →

Installation

npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill roblox-luau

Summary

>

SKILL.md

Roblox Luau Scripting

Script a Roblox experience in Luau: services, Instances, events, the server/client split, and secure cross-boundary communication. Targets the current Roblox engine and Studio.

When to use

  • Use when writing Roblox scripts: getting services, creating/parenting instances,

connecting events, deciding server vs client, or wiring RemoteEvent/ RemoteFunction communication.

  • Use when the project has Script/LocalScript/ModuleScript objects, .rbxl(x)

places, or a Rojo *.project.json, and code calls game:GetService(...).

*When not to use:* persisting data across sessions → roblox-datastores. Generic Lua questions unrelated to the Roblox API. Engine-agnostic input/save architecture → input-systems / save-systems.

Core workflow

  1. Get services with game:GetService("Name"). Common ones: Players,

Workspace, ReplicatedStorage (shared client+server), ServerScriptService (server-only code), ServerStorage, RunService, UserInputService (client).

  1. Know where code runs. A Script runs on the server; a LocalScript

runs on a client (in StarterPlayerScripts, StarterGui, or the player's character). A ModuleScript is shared code you require.

  1. Create instances deliberately. local p = Instance.new("Part"), set its

properties, then set p.Parent last (parenting triggers replication).

  1. React with events. :Connect to signals like Players.PlayerAdded,

part.Touched, or RunService.Heartbeat. Disconnect when done to avoid leaks.

  1. Cross the client/server boundary with Remotes — and never trust the client.

Clients request via RemoteEvent:FireServer(...); the server validates and applies. The server is authoritative for all game state.

  1. Test in Studio with Play / Play Here / server+client Start; use the Output

window and the server/client view toggle to confirm where code ran.

Patterns

1. Server Script: react to players joining (leaderstats)

-- ServerScriptService/Leaderboard.server.luau  (a Script = runs on the server)
local Players = game:GetService("Players")

local function onPlayerAdded(player: Player)
    local stats = Instance.new("Folder")
    stats.Name = "leaderstats"          -- this name makes it show on the leaderboard

    local coins = Instance.new("IntValue")
    coins.Name = "Coins"
    coins.Value = 0
    coins.Parent = stats

    stats.Parent = player               -- parent LAST
end

Players.PlayerAdded:Connect(onPlayerAdded)

2. Create and configure an instance

local Workspace = game:GetService("Workspace")

local part = Instance.new("Part")
part.Size = Vector3.new(4, 1, 4)
part.Position = Vector3.new(0, 10, 0)
part.Anchored = true                    -- won't fall under gravity
part.BrickColor = BrickColor.new("Bright blue")
part.Parent = Workspace                 -- set Parent last so it replicates once, fully

3. Connect an event (and disconnect to avoid leaks)

local debounce = false
local connection
connection = part.Touched:Connect(function(hit: BasePart)
    local character = hit.Parent
    local humanoid = character and character:FindFirstChildOfClass("Humanoid")
    if not humanoid or debounce then return end
    debounce = true
    humanoid.Health -= 10
    task.wait(1)                        -- task.wait, NOT the deprecated wait()
    debounce = false
end)

-- Later, when the part is removed or the round ends:
-- connection:Disconnect()

4. Client → server with a RemoteEvent (validate on the server!)

-- ReplicatedStorage: create a RemoteEvent named "BuyItem" (in Studio or via code).
-- CLIENT (LocalScript): request a purchase. The client can lie — this is only a request.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local buyItem = ReplicatedStorage:WaitForChild("BuyItem")  -- wait: may not have replicated yet
buyButton.MouseButton1Click:Connect(function()
    buyItem:FireServer("sword")        -- send the item id only; never the price/result
end)
-- SERVER (Script): the ONLY place the transaction is decided.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local buyItem = ReplicatedStorage:WaitForChild("BuyItem")
local PRICES = { sword = 100, shield = 75 }

buyItem.OnServerEvent:Connect(function(player: Player, itemId)
    -- TRUST NOTHING from the client. Validate types and values.
    if type(itemId) ~= "string" then return end
    local price = PRICES[itemId]
    if not price then return end                         -- unknown item
    local coins = player.leaderstats.Coins
    if coins.Value < price then return end               -- can't afford
    coins.Value -= price                                 -- server applies the change
    grantItem(player, itemId)
end)

5. A per-frame loop with RunService

local RunService = game:GetService("RunService")
-- Heartbeat fires every frame AFTER physics; dt is seconds since the last step.
RunService.Heartbeat:Connect(function(dt)
    spinner.CFrame *= CFrame.Angles(0, math.rad(90) * dt, 0)  -- 90deg/sec, frame-independent
end)

6. Shared code in a ModuleScript

-- ReplicatedStorage/GameConfig (a ModuleScript) — usable by server and client.
local GameConfig = {}
GameConfig.MaxHealth = 100
function GameConfig.damageFor(weapon: string): number
    return ({ sword = 25, bow = 15 })[weapon] or 0
end
return GameConfig
local GameConfig = require(game:GetService("ReplicatedStorage"):WaitForChild("GameConfig"))
print(GameConfig.MaxHealth)

Pitfalls

  • Trusting the client is an exploit → clients can send any arguments to a

RemoteEvent/RemoteFunction. Validate every argument's type and range on the server and keep the server authoritative over health, currency, and inventory.

  • LocalScript doesn't run where you put it → LocalScripts run in

StarterPlayerScripts, StarterCharacterScripts, StarterGui, or tools — not in Workspace or ServerScriptService. Server Scripts belong in ServerScriptService/Workspace.

  • Deprecated globals → use task.wait/task.spawn/task.delay, not the old

wait()/spawn()/delay() (worse scheduling and throttling).

  • Parenting first, then setting properties → set properties first and Parent

last so the instance replicates once in its final state.

  • nil on the client right after join → objects stream/replicate over time; use

parent:WaitForChild("Name") instead of indexing directly on the client.

  • Connections never disconnected → long-lived :Connect handlers leak and can

fire on destroyed objects; store the connection and :Disconnect() (or use Instance:GetAttributeChangedSignal/:Once where appropriate).

  • Using a RemoteFunction where a RemoteEvent fits → RemoteFunction blocks

waiting for a return and a malicious/slow client can stall the server; prefer one-way RemoteEvents unless you genuinely need a reply.

References

  • For the full client/server model (replication, RemoteFunction vs RemoteEvent,

:WaitForChild timing, BindableEvent for same-context messaging, attributes, CollectionService tags, and :Once/connection cleanup), read references/client-server.md.

Related skills

  • roblox-datastores — persist player data across sessions (server-only).
  • save-systems — engine-agnostic persistence concepts.
  • game-ai / input-systems — portable AI and input patterns to implement in Luau.

Score

0–100
55/ 100

Grade

C

Popularity15/30

869 installs — growing adoption.

Completeness19/30

Documented: full SKILL.md body, one-line install. Missing: description, category/license metadata.

Trust15/25

Community skill with a public GitHub source repository you can review.

Freshness6/15

No update timestamp is tracked for this skill in our catalog.

Scored automatically from popularity, completeness, trust, and freshness — computed only from data in our catalog, never fabricated.

Proud of your score? Add this badge to your README.

Paste a snippet into your GitHub README. The badge updates automatically and links back to this page.

Roblox Luau skill score badge previewScore badge

Markdown

[![Roblox Luau skill](https://www.claudemarket.ai/skills/gamedev-skills/awesome-gamedev-agent-skills/roblox-luau/badges/score.svg)](https://www.claudemarket.ai/skills/gamedev-skills/awesome-gamedev-agent-skills/roblox-luau)

HTML

<a href="https://www.claudemarket.ai/skills/gamedev-skills/awesome-gamedev-agent-skills/roblox-luau"><img src="https://www.claudemarket.ai/skills/gamedev-skills/awesome-gamedev-agent-skills/roblox-luau/badges/score.svg" alt="Roblox Luau skill"/></a>

Roblox Luau FAQ

How do I install the Roblox Luau skill?

Run “npx skills add https://github.com/gamedev-skills/awesome-gamedev-agent-skills --skill roblox-luau” in your terminal. The skill is added to your agent's skills directory and picked up automatically on the next run — no restart or extra configuration needed.

What does the Roblox Luau skill do?

> The full SKILL.md on this page shows the exact instructions the skill gives your agent.

Is the Roblox Luau skill free?

Yes. Roblox Luau is a free, open-source skill published from gamedev-skills/awesome-gamedev-agent-skills. As with any third-party skill, review the source repository before installing it into an agent with sensitive access.

Does Roblox Luau work with Claude Code and OpenClaw?

Yes. Skills use the portable SKILL.md format, so Roblox Luau works with Claude Code, OpenClaw, Codex, Hermes, and any other agent that reads SKILL.md skills.

Recommended skills

Browse all →
find-skills logo

find-skills

vercel-labs/skills

2.9M installsInstall
grill-me logo

grill-me

mattpocock/skills

817K installsInstall
frontend-design logo

frontend-design

anthropics/skills

762K installsInstall
grill-with-docs logo

grill-with-docs

mattpocock/skills

696K installsInstall
improve-codebase-architecture logo

improve-codebase-architecture

mattpocock/skills

671K installsInstall
agent-browser logo

agent-browser

vercel-labs/agent-browser

652K installsInstall

Related guides

Hand-picked reading to help you choose, install, and use agent skills.

GuideBest Openclaw Skills 2026GuideHow To Evaluate Openclaw Skill Before InstallingGuideOpenclaw Skills Complete Guide

Skills by category

FrontendBackend & APIsTesting & QASecurityDevOps & CI/CDMCP & ToolingAutomationData & Analysis+27 more

MCP servers by category

MCP & ToolingBackend & APIsData & AnalysisDevOps & CI/CDAutomationSecurityDocsTesting & QA+24 more

Plugins by category

AutomationDevOps & CI/CDData & AnalysisDesign & CreativeSecurityBackend & APIsFrontendTesting & QA+16 more

Marketplaces by category

AutomationData & AnalysisDevOps & CI/CDDesign & CreativeFrontendBackend & APIsTesting & QASecurity+21 more

The Agent Stack

Weekly Claude Code, Agent SDK, and MCP moves worth your time — free.

Claude Market

AI agent skills directory, marketplace, and workflow hub for OpenClaw, Hermes Agent, Claude Code, Codex, and MCP-powered operator stacks.

Independent project, not affiliated with Anthropic.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Plugins
  • Browse Marketplaces
  • Newsletter

More

  • Submit a Tool
  • Create a Skill
  • Advertise
  • Free Tools
  • API
  • Shipping
  • Contact
  • Terms
  • Privacy
© 2026 Claude Market · Not affiliated with Anthropic
Fazier badgeFeatured on Twelve ToolsFeatured on Wired BusinessRemote OpenClaw - Featured on AI Agents DirectoryListed on Turbo0Featured on Uneed