Roblox Architecture logo

Roblox Architecture

Community
EL4CTEO
roblox-architecture

Roblox project structure and client/server model - replication, where code and assets belong (ServerScriptService, ReplicatedStorage, StarterPlayer), RunContext, service/controller bootstrapping, player/character lifecycle, CollectionService components, attributes, streaming-safe client code, library choices. Use when starting a project, deciding where code goes, or fixing replication/streaming bugs.

Overview

PublisherEL4CTEO
Repositoryroblox-skills
Skill nameroblox-architecture
Stars
170
Forks
18
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by EL4CTEO on GitHub. Read the source before you install it.

Installation

Install the Roblox Architecture AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/EL4CTEO/roblox-skills/tree/main/skills/roblox-architecture
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/EL4CTEO/roblox-skills.git /tmp/roblox-skills
mkdir -p .claude/skills
cp -r /tmp/roblox-skills/skills/roblox-architecture .claude/skills/roblox-architecture
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Roblox Architecture in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Roblox Architecture on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Roblox Architecture is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Roblox game architecture

The model in one paragraph

Every Roblox game is a server (authoritative, runs Scripts, sees everything, owns DataStores) plus one client per player (runs LocalScripts / client Scripts, renders, reads input). The server's DataModel replicates to clients automatically. Client changes do not replicate back, except: physics of parts the client has network ownership of (its character by default), its own Humanoid state/animations, and remote calls. Assume every client is compromised (see roblox-security). Design every feature as: client requests → server validates and decides → state replicates → clients render.

Where things go

ContainerRuns/visible onPut here
ServerScriptServiceServer onlyServer Scripts and server-only ModuleScripts (game logic, data, anti-cheat).
ServerStorageServer onlyServer-only assets: maps, NPC templates, tools to clone, secrets-adjacent config.
ReplicatedStorageBothShared modules (types, config, pure utils), RemoteEvents, assets clients clone.
ReplicatedFirstClient, firstLoading screen only. Replicates before everything else.
StarterPlayer.StarterPlayerScriptsClient (copied once to PlayerScripts)Client entry point and controllers.
StarterPlayer.StarterCharacterScriptsClient (copied per spawn into character)Per-character client scripts (rarely needed).
StarterGuiClient (copied to PlayerGui)ScreenGuis. Set ResetOnSpawn = false unless you want reset on death.
WorkspaceBoth (streamed to clients)The 3D world only. Not a place for code or templates.
Lighting, SoundService, Teams, TextChatServiceBothTheir respective config objects.

Rules:

  • Code in ReplicatedStorage is downloadable by exploiters. Never put server logic, secrets, admin lists, or anti-cheat thresholds there.
  • Script.RunContext: Legacy (default: behavior depends on the container), Server, Client, or Plugin. A non-Legacy RunContext makes a Script run regardless of container (e.g. a Client Script in ReplicatedStorage runs on every client) — so templates you clone must not contain such scripts unintentionally. Legacy Scripts don't run in ReplicatedStorage/ServerStorage.

Project layout (Rojo-style, recommended)

text
src/
  server/            -> ServerScriptService.Server   (init.server.luau = entry point)
    Services/        -> one ModuleScript per system (DataService, CombatService, ...)
  client/            -> StarterPlayer.StarterPlayerScripts.Client (init.client.luau)
    Controllers/     -> one ModuleScript per client system (InputController, UIController, ...)
  shared/            -> ReplicatedStorage.Shared (types, config, pure logic, network definitions)
Packages/            -> ReplicatedStorage.Packages (Wally/pesde dependencies)
ServerPackages/      -> ServerScriptService.ServerPackages

One entry script per side, everything else is a ModuleScript. This gives deterministic load order, testable modules, and a single place to wire dependencies. Roblox's own recommendation is equivalent: one Script (RunContext = Server) in ServerScriptService and one Script (RunContext = Client) in ReplicatedStorage, each requiring modules and calling their start(). Tooling setup: roblox-tooling.

Bootstrapping services (no framework needed)

luau
--!strict
-- ServerScriptService/Server/init.server.luau
type Service = {
	init: ((self: Service) -> ())?, -- sync setup; may reference other services; must not yield
	start: ((self: Service) -> ())?, -- runs after every init; may yield / connect events
}

local servicesFolder = script:WaitForChild("Services")
local services: { [string]: Service } = {}

for _, module in servicesFolder:GetChildren() do
	if module:IsA("ModuleScript") then
		services[module.Name] = (require :: any)(module)
	end
end

for name, service in services do
	if service.init then
		debug.setmemorycategory(name)
		service:init()
		debug.resetmemorycategory()
	end
end

for name, service in services do
	if service.start then
		task.spawn(function()
			debug.setmemorycategory(name)
			service:start()
		end)
	end
end
  • Services reference each other with plain require (no cycles) or receive dependencies in init.
  • The client mirrors this with Controllers. Keep names symmetrical (ShopService / ShopController).
  • Frameworks like Knit are unnecessary for this; if a project already uses one, follow its conventions.

Player and character lifecycle

luau
--!strict
local Players = game:GetService("Players")

local function onCharacterAdded(player: Player, character: Model)
	local humanoid = character:WaitForChild("Humanoid") :: Humanoid
	humanoid.Died:Once(function()
		print(`{player.Name} died`)
	end)
end

local function onPlayerAdded(player: Player)
	-- Load data first (see roblox-data-stores), then set up character handling.
	if player.Character then
		task.spawn(onCharacterAdded, player, player.Character)
	end
	player.CharacterAdded:Connect(function(character)
		onCharacterAdded(player, character)
	end)
end

local function onPlayerRemoving(player: Player)
	-- Save data, release session locks, clear every table keyed by this player.
	print(`{player.Name} left`)
end

Players.PlayerAdded:Connect(onPlayerAdded)
Players.PlayerRemoving:Connect(onPlayerRemoving)
for _, player in Players:GetPlayers() do -- players who joined before this script connected
	task.spawn(onPlayerAdded, player)
end

game:BindToClose(function()
	-- Server shutdown: flush saves for remaining players (max ~30 s total).
end)
  • Always handle players/characters that already exist when your code starts.
  • Characters respawn: anything bound to a character must be re-created on CharacterAdded.
  • On the client, character descendants may not exist yet (streaming): WaitForChild them.

Components with CollectionService tags

Tag instances (Studio Tags section or CollectionService:AddTag) and attach behavior in code. This scales better than copying scripts into every model and works with streaming because the added/removed signals fire as instances stream in and out.

luau
--!strict
local CollectionService = game:GetService("CollectionService")

local TAG = "KillBrick"
local cleanups: { [Instance]: () -> () } = {}

local function onAdded(instance: Instance)
	if not instance:IsA("BasePart") then
		return
	end
	local connection = instance.Touched:Connect(function(hit)
		local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
		if humanoid then
			humanoid.Health = 0
		end
	end)
	cleanups[instance] = function()
		connection:Disconnect()
	end
end

local function onRemoved(instance: Instance)
	local cleanup = cleanups[instance]
	if cleanup then
		cleanup()
		cleanups[instance] = nil
	end
end

CollectionService:GetInstanceAddedSignal(TAG):Connect(onAdded)
CollectionService:GetInstanceRemovedSignal(TAG):Connect(onRemoved)
for _, instance in CollectionService:GetTagged(TAG) do
	task.spawn(onAdded, instance)
end

Configure components with attributes (instance:GetAttribute("Damage"), GetAttributeChangedSignal) instead of IntValue/StringValue children. Attributes replicate server → client, are cheaper, and show in the Properties panel.

Sharing state

NeedUse
Small per-instance/per-player values visible to clientsAttributes on the instance / Player (server sets).
Events and requestsRemoteEvent / UnreliableRemoteEvent (see roblox-networking).
Large or per-player private state (inventory, quests)Server-owned tables + remotes that send snapshots/diffs to that player only.
Same-side communicationModule function calls or a typed Signal module — not BindableEvent, _G, or shared.
Persistent dataroblox-data-stores. Cross-server: MessagingService / MemoryStore.

Streaming (on by default for new places)

With Workspace.StreamingEnabled, clients only have nearby parts. Client code must:

  • WaitForChild (with a timeout when it may never arrive) or nil-check anything in Workspace.
  • Use ModelStreamingMode = Atomic for models whose parts scripts need together; Persistent only when a model must always be present (costs memory).
  • Treat GetChildren, raycasts, and property reads of streamed-out parts as partial/stale; do full-world queries on the server.
  • Pre-stream destinations on the server with player:RequestStreamAroundAsync(position) before teleporting a character.
  • Scopes, racing, free cameras: player.FrustumStreaming = Enum.FrustumStreamingMode.Automatic streams what the camera sees instead of raising the radius.

Full pattern catalog and recommended Workspace settings: references/streaming.md.

Anti-patterns

  • Dozens of loose Scripts inside parts/models (use tags + one service).
  • Polling loops (while task.wait(0.1) do check() end) instead of events or Heartbeat with deltaTime.
  • Trusting the client for game state, or firing remotes every frame.
  • _G/shared globals, circular requires, yielding at module top level.
  • Cloning maps into Workspace from the client (client-only copies never get server updates).
  • Storing per-player data in the character (it's destroyed on death).

Library ecosystem (signals, cleanup, networking, UI, ECS, data): references/ecosystem.md.

Related skills

roblox-networking, roblox-security, roblox-data-stores, roblox-tooling, roblox-performance, roblox-game-systems.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Roblox Architecture AI skill do?

Roblox project structure and client/server model - replication, where code and assets belong (ServerScriptService, ReplicatedStorage, StarterPlayer), RunContext, service/controller bootstrapping, player/character lifecycle, CollectionService components, attributes, streaming-safe client code, library choices. Use when starting a project, deciding where code goes, or fixing replication/streaming bugs.

Why use Roblox Architecture on TypingMind?

Because you install it once and use it with any model. Roblox Architecture is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Roblox Architecture in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/EL4CTEO/roblox-skills/tree/main/skills/roblox-architecture. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Roblox Architecture?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Roblox Architecture?

As many as you like. As long as a model supports skills, you can use Roblox Architecture with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Roblox Architecture AI skill free?

Yes. It is published on GitHub by EL4CTEO under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇