Dataset Viewer
Auto-converted to Parquet Duplicate
system
stringclasses
11 values
instruction
stringlengths
53
519
response
stringlengths
487
5.96k
metadata
unknown
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i write typed luau? i keep seeing --!strict at the top of scripts and : string type stuff. can you show a simple function with types and explain what the annotations actually do
Typed Luau catches a whole class of bugs at edit time instead of at runtime. The `--!strict` at the top of a script turns on strict type checking: the compiler now errors if you pass the wrong type, call a method that doesn't exist, or read a property that could be `nil` without handling it. Without it (`--!nonstrict` ...
{ "category": "language-and-core-luau", "subcategory": "typed-luau-basics", "task_type": "implementation", "difficulty": "beginner", "topics": [ "typed Luau", "--!strict", "type annotations", "export type" ], "engine_context": { "luau_features": [ "typed Luau", "exported ty...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i have a bunch of scripts all repeating the same coin logic. how should i structure reusable luau code? show a module pattern and how to make a simple class with a constructor
The idiomatic answer is a `ModuleScript` that returns a table, and for stateful things a `table` with methods created by a constructor. Roblox loads each ModuleScript once and caches it, so requiring the same module from many scripts shares one instance — perfect for stateless helpers, and fine for classes as long as...
{ "category": "language-and-core-luau", "subcategory": "modules-and-oop", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "ModuleScript", "OOP", "metatables", "setmetatable", "constructor" ], "engine_context": { "luau_features": [ "typed Luau", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
what are luau generics and when would i actually use them? i see <T> in some codebases and don't get the point vs just using any
Generics let one function or type work over many concrete types while still keeping full type safety — no `any`, no lost information. The `<T>` is a type parameter: the caller fills it in, and Luau tracks what `T` actually was for each call site. A concrete case — a type-safe signal/event wrapper: ```lua --!stric...
{ "category": "language-and-core-luau", "subcategory": "generics", "task_type": "explanation", "difficulty": "advanced", "topics": [ "Luau generics", "type packs", "type safety", "functional patterns" ], "engine_context": { "luau_features": [ "typed Luau", "generics", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i have a button that fires a RemoteEvent to the server to give the player a sword. how do i make sure a player can't spam the remote and get 100 swords, and how should the client even call it
Two separate concerns: (1) preventing spam (rate limiting / debounce) and (2) never trusting the client to decide *what* it gets. The client should only send "I want to claim my starter sword" — the server owns the catalog of what that means and enforces a one-time claim with a per-player cooldown / flag. `Replicate...
{ "category": "client-server-networking", "subcategory": "remote-event-security", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "RemoteEvent", "OnServerEvent", "FireServer", "anti-exploit", "debounce", "ServerStorage" ], "engine_context": { "luau_feat...
You are Atmos, performing a security review of a Roblox experience. Treat the client as fully hostile: assume any RemoteEvent/RemoteFunction argument can be spoofed, and verify every decision that affects other players or persistent state on the server.
review this: client fires a remote with (weaponName, damage) and the server applies that damage to the hit player. is that safe? ```lua -- server damageRemote.OnServerEvent:Connect(function(attacker, weaponName, damage) local target = getTargetFromWeapon(weaponName) if target then target.Health -= damage end end)...
No — this is unsafe, and it's the classic "client-authoritative combat" mistake. The server is letting the client dictate *both* the weapon identity and the damage number. An exploiter opens their client, fires `damageRemote:FireServer("any", 999999)`, and instantly deletes anyone. The `weaponName` is also client-sup...
{ "category": "client-server-networking", "subcategory": "combat-authority", "task_type": "security_review", "difficulty": "advanced", "topics": [ "RemoteEvent", "OnServerEvent", "anti-exploit", "server-authoritative", "input validation" ], "engine_context": { "luau_features": [ ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i'm saving player data with SetAsync on PlayerRemoving but players lose progress sometimes and i heard about UpdateAsync and session locking. can you write a proper save system that doesn't lose data and handles the server shutting down?
`SetAsync` overwrites unconditionally, so if two saves for the same key are in flight at once (autosave firing as the player leaves, or two servers both thinking they own the session), the last write wins and can clobber newer data — that's your lost-progress bug. The fix is: atomic read-modify-write with `UpdateAsyn...
{ "category": "data-persistence", "subcategory": "datastore-save-system", "task_type": "implementation", "difficulty": "advanced", "topics": [ "DataStoreService", "UpdateAsync", "GetAsync", "BindToClose", "session lock", "PlayerRemoving" ], "engine_context": { "luau_features": ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i make a global leaderboard that shows top 10 players by coins across the whole game? i think i need an OrderedDataStore
Correct — a global leaderboard is exactly what `OrderedDataStore` is for, because it keeps entries sorted by value so you can fetch the top N with `GetSortedAsync`. The pattern: every time a player's coins change (server-side, after you've validated it), write their UserId→coins pair into the ordered store. Never w...
{ "category": "data-persistence", "subcategory": "ordered-datastore-leaderboard", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "OrderedDataStore", "GetSortedAsync", "SetAsync", "leaderboard", "GetNameFromUserIdAsync" ], "engine_context": { "luau_features...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i want to spawn health pickups around my map and detect when a player touches them, but i don't want to hardcode a million positions or write a script per pickup. what's the clean way?
Use `CollectionService` tags plus `attributes` — it's the standard "data-driven" pattern that keeps level design in Studio (where a designer drops parts) and logic in one script. Tag every pickup with `HealthPickup`, set a `HealAmount` attribute on each, and one server script finds and wires them all. In Studio: giv...
{ "category": "platform-services", "subcategory": "collection-service-tags", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "CollectionService", "GetTagged", "attributes", "Touched", "GetInstanceAddedSignal" ], "engine_context": { "luau_features": [ ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i want to make a private server for a group of friends when they click 'play with squad' — like a custom matchmaking that creates a reserved server and teleports the whole party into it. how?
That's `TeleportService:ReserveServerAsync` (which returns a private server code/ID) plus `TeleportToPrivateServer`, called from the server. The party leader sends the squad list via a RemoteEvent; the server reserves the server and teleports everyone. The client must never reserve the server itself (that's a paid, ser...
{ "category": "platform-services", "subcategory": "private-server-matchmaking", "task_type": "implementation", "difficulty": "advanced", "topics": [ "TeleportService", "ReserveServerAsync", "TeleportToPrivateServer", "private servers", "party matchmaking" ], "engine_context": { "lu...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i want to push a ball when the player presses a button. i used BodyVelocity before but people say it's deprecated now — what's the modern way to apply a force/movement to a part?
`BodyVelocity` and the rest of the `Body*` mover family (`BodyPosition`, `BodyGyro`, `BodyForce`, `BodyAngularVelocity`, `BodyThrust`) are deprecated. The modern replacement is **constraint-based movers**: `LinearVelocity` for directional push, `VectorForce` for a raw force, `AlignPosition` for moving toward a target, ...
{ "category": "physics-and-world", "subcategory": "constraint-movers", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "LinearVelocity", "VectorForce", "constraints", "Attachment", "deprecated BodyVelocity" ], "engine_context": { "luau_features": [ "t...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i make a gun bullet that goes where the player is looking and hits the first thing? i've seen raycasting mentioned
Raycasting is exactly right — you cast an invisible ray from the muzzle in the aim direction and see what it hits first. The modern API is `workspace:Raycast(origin, direction, raycastParams)`. Avoid the old `FindPartOnRay` family (deprecated); always pass a `RaycastParams` so you control what the ray can hit (e.g. i...
{ "category": "physics-and-world", "subcategory": "raycasting", "task_type": "implementation", "difficulty": "beginner", "topics": [ "Raycast", "RaycastParams", "workspace:Raycast", "Touched", "gun" ], "engine_context": { "luau_features": [ "typed Luau" ], "services":...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i heard roblox has a new character controller library that replaces writing your own movement with CFrame and Humanoid.MoveTo. how do i set it up so a player character uses the modern controllers (walking, jumping, swimming, climbing) and how do i read their movement direction?
The **Character Controller Library** is the modern replacement for hand-rolled CFrame movement. You add a `ControllerManager` to the character and parent controller instances to it (`GroundController`, `AirController`, `SwimController`, `ClimbController`). The library then reads player input (keyboard + thumbstick) aut...
{ "category": "characters-animation-ai", "subcategory": "character-controller-library", "task_type": "implementation", "difficulty": "advanced", "topics": [ "ControllerManager", "GroundController", "AirController", "SwimController", "ClimbController", "Character Controller Library", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i play an animation on my character when i swing a tool, and why does my old code using Humanoid:LoadAnimation warn me about Animator?
`Humanoid:LoadAnimation` (and `AnimationController:LoadAnimation`) is deprecated — the current, correct path is `Animator:LoadAnimation`, where the `Animator` lives inside the `Humanoid` (or `AnimationController`). The reason: the `Animator` is what actually owns and replicates animation playback, so loading tracks t...
{ "category": "characters-animation-ai", "subcategory": "animator-loadanimation", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "Animator", "LoadAnimation", "AnimationTrack", "KeyframeReached", "GetMarkerReachedSignal", "deprecated Humanoid:LoadAnimation" ]...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i make an NPC that walks to the player and only attacks when it has line of sight? i want proper pathfinding that goes around walls
Use `PathfindingService:FindPathAsync` to get a `Path` with waypoints that route around obstacles, follow the waypoints by moving the Humanoid (or a controller), and gate attacks on a `Raycast` line-of-sight check so the NPC doesn't attack through walls. Configure `AgentParameters` for radius/height/can-jump so the pat...
{ "category": "characters-animation-ai", "subcategory": "npc-pathfinding", "task_type": "implementation", "difficulty": "advanced", "topics": [ "PathfindingService", "FindPathAsync", "Path", "MoveTo", "Raycast", "line-of-sight", "NPC AI" ], "engine_context": { "luau_feature...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i'm building a shop GUI. i want a panel that slides in from the right when opened and a list of item buttons laid out automatically. how should i structure the GUI and animate it?
Structure the GUI with a `ScreenGui` → `Frame` (the panel) → a layout object (`UIListLayout`) for the buttons, and animate the panel with `TweenService` (not manual loops). Layouts handle positioning so you don't hardcode every button's position. In Studio: `StarterGui > ShopScreenGui (ScreenGui) > Panel (Frame) >...
{ "category": "ui-ux", "subcategory": "gui-animation-layout", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "ScreenGui", "Frame", "UIListLayout", "TweenService", "UDim2", "TextButton" ], "engine_context": { "luau_features": [ "typed Luau" ],...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i made a TextBox where players type their name and a button to confirm, but the GUI is tiny on mobile and huge on desktop. how do i make UI scale to screen size and read the textbox input?
Two things: (1) size your UI with `UDim2` *scale* components (the `0.x` part) instead of fixed offsets, and/or add a `UIScale` so the whole GUI scales with screen size; (2) read the TextBox with its `.Text` property and connect the button's `Activated` event. `StarterPlayer/StarterPlayerScripts/NameUI.lua`: ```lua --!...
{ "category": "ui-ux", "subcategory": "responsive-gui-input", "task_type": "implementation", "difficulty": "beginner", "topics": [ "TextBox", "TextButton", "UDim2", "UIScale", "StarterGui", "PlayerGui" ], "engine_context": { "luau_features": [ "typed Luau" ], "ser...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i want an item shop where each item shows a live rotating 3D preview of its model inside the GUI, like an inventory screen. how do i render a 3D model inside a 2D GUI?
That's a `ViewportFrame` — a GUI element that renders 3D objects (a `WorldModel` with your models, plus its own `CurrentCamera`) inside a 2D `ScreenGui`. You parent the model(s) into the ViewportFrame's `WorldModel`, give it a `CurrentCamera`, and rotate the model on a `RenderStepped`/heartbeat connection. `StarterP...
{ "category": "ui-ux", "subcategory": "viewportframe-3d-preview", "task_type": "implementation", "difficulty": "advanced", "topics": [ "ViewportFrame", "WorldModel", "CurrentCamera", "RenderStepped", "3D GUI preview" ], "engine_context": { "luau_features": [ "typed Luau" ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how does the new roblox audio system work? i used to just put a Sound in a part and call :Play(), but i hear there's an 'audio object graph' with AudioEmitter and AudioListener now. when do i use which, and how do i play a 3d-positioned sound?
Both still exist, and they serve different needs. The classic `Sound` object (child of a part, `:Play()`) is simplest for basic positioned audio and is *not* deprecated. The **audio object graph** (the "Dynamics" API) — `AudioPlayer` + `AudioEmitter` + `AudioListener`, gated by `SoundService.AudioApi = Dynamics` — ...
{ "category": "audio-and-vfx", "subcategory": "audio-object-graph", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "AudioPlayer", "AudioEmitter", "AudioListener", "SoundService.AudioApi", "Sound", "audio object graph" ], "engine_context": { "luau_featu...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i make a simple particle effect when my player picks up a coin? like sparks. and can i tween its size/transparency?
Use a `ParticleEmitter` parented to the part where the effect should appear, and trigger it with `:Emit(count)`. For a one-shot burst (sparks on pickup), you don't even need it continuously emitting — set `Enabled = false` and call `Emit` when the event happens. You can drive size/transparency over the particle's lif...
{ "category": "audio-and-vfx", "subcategory": "particle-emitter", "task_type": "implementation", "difficulty": "beginner", "topics": [ "ParticleEmitter", "Emit", "TweenService", "NumberSequence", "VFX" ], "engine_context": { "luau_features": [ "typed Luau" ], "service...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
can roblox luau create meshes at runtime now? i want to generate a procedural terrain chunk or a custom shape from code without importing a model. what's the API?
Yes — `EditableMesh` (and `EditableImage` for textures) lets you build/modify geometry at runtime. You create one via `AssetService:CreateEditableMeshAsync()`, add vertices and faces, then parent it to a `MeshPart` (set the part's `MeshId` to the editable mesh) so it renders. It's the runtime replacement for hand-aut...
{ "category": "assets-and-content-pipeline", "subcategory": "editable-mesh", "task_type": "implementation", "difficulty": "advanced", "topics": [ "EditableMesh", "CreateEditableMeshAsync", "CreateVertex", "CreateFace", "AssetService", "MeshPart", "procedural mesh" ], "engine_co...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
what's the difference between a Package and the old LinkedSource thing on scripts? i want a shared module that updates everywhere when i change it
They're two different eras of "reuse one thing in many places," and `LinkedSource` is deprecated — **Packages** are the current, supported way to have a single source of truth that propagates updates to every instance. - **`LinkedSource` (deprecated):** the old mechanism where a `Script`/`ModuleScript` could have it...
{ "category": "assets-and-content-pipeline", "subcategory": "packages-vs-linkedsource", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "Packages", "LinkedSource", "ModuleScript", "asset reuse", "versioning" ], "engine_context": { "luau_features": [], "ser...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i want to make a roblox studio plugin — a button in the toolbar that, when clicked, selects all parts tagged 'NeedsReview' and shows them in a dockable window. how do i start a plugin?
A plugin is a `Script` (or `LocalScript`) with `RunContext = RunContext` set so Studio runs it, placed under `ServerStorage`/`ServerScriptService`? No — plugins live in a special place: you create them via *Plugins → Create Plugin*, which scaffolds a `Script` whose `RunContext` is `Plugin`. In that script you use t...
{ "category": "plugin-and-studio-tooling", "subcategory": "studio-plugin", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "Plugin", "CreateToolbar", "CreateButton", "CreateDockWidgetPluginGuiAsync", "Selection", "CollectionService", "plugin dev" ], "en...
You are Atmos, profiling and optimizing a Roblox experience. Ground every recommendation in a concrete mechanism (allocation, replication cost, physics step, render batching) rather than generic advice, and note the tradeoffs of any optimization you suggest.
my game lags when there are 200+ NPCs. profiling shows tons of allocations and the server tick is slow. what concrete luau/roblox changes actually help at that scale?
At 200+ NPCs the wins come from cutting per-frame allocation, reducing replication/network cost, and letting the engine do the work instead of Lua loops. Concrete, mechanism-backed fixes: 1. **Stop allocating tables in the hot loop.** `table.insert`, `{}` inside a per-frame `Heartbeat`/`RenderStepped` connection creat...
{ "category": "engineering-practice", "subcategory": "scale-optimization", "task_type": "optimization", "difficulty": "advanced", "topics": [ "MicroProfiler", "GetPartBoundsInBox", "OverlapParams", "table.clear", "parallel Lua", "Actor", "allocation", "replication" ], "engi...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i write automated tests for my luau modules? i don't want to manually click around every time i change the economy code. is there a testing framework?
The standard is **TestEZ** (Roblox's Lua unit-test framework), usually run from a `TestService` test or via the command line with Rojo/CLI. The pattern: a `*Spec` ModuleScript that describes tests with `it(...)`, grouped by `describe(...)`, using `expect(...)` assertions. Roblox also has a built-in `TestService` for ru...
{ "category": "engineering-practice", "subcategory": "unit-testing-testez", "task_type": "testing", "difficulty": "intermediate", "topics": [ "TestEZ", "describe", "it", "expect", "unit testing", "ModuleScript" ], "engine_context": { "luau_features": [ "typed Luau" ],...
You are Atmos, performing a security review of a Roblox experience. Treat the client as fully hostile: assume any RemoteEvent/RemoteFunction argument can be spoofed, and verify every decision that affects other players or persistent state on the server.
do a full security pass on a typical tycoon game's server. assume the client can fire any remote with any arguments. what are the exploit classes i must defend against and how?
Treating the client as hostile, here are the exploit classes that actually get tycoon (and most multiplayer) games, and the server-side defense for each. This is the checklist I'd apply before shipping. **1. Client-supplied economy values (most common).** If the client sends `{ "item": "Drill", "cost": 0 }` or `{ "amo...
{ "category": "security", "subcategory": "exploit-classes-defense", "task_type": "security_review", "difficulty": "expert", "topics": [ "anti-exploit", "server-authoritative", "RemoteEvent", "rate limiting", "network ownership", "TextService filtering", "session lock" ], "engin...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i'm building a big game that needs cross-server features: a global chat, a global market where players trade, and telling players how many are online total across all servers. how do i architect that across multiple server instances?
Cross-server state lives outside any single game server, so you need Roblox's cross-server services: **MessagingService** (pub/sub between servers of the same experience), **MemoryStoreService** (fast, non-permanent cross-server data: sorted maps, hash maps, queues with TTL), and **DataStoreService/Open Cloud** for per...
{ "category": "scale-and-production", "subcategory": "cross-server-architecture", "task_type": "architecture", "difficulty": "expert", "topics": [ "MessagingService", "MemoryStoreService", "GetHashMap", "GetSortedMap", "DataStoreService", "Open Cloud", "cross-server", "scalabil...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i turn on strict typing in a script and make a simple type alias for a player profile
Enable type checking with the `--!strict` mode flag at the very top of the file (before any code or comments). `--!strict` makes Luau error when it cannot prove a value's type, which is what catches nil bugs at edit time instead of at runtime. Use `export type` so the alias is visible to other modules that require this...
{ "id": "atmos-language-and-core-luau-beginner-1001", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "beginner", "topics": [ "typed-luau", "type-aliases", "strict-mode" ], "engine_context": { "luau_features": [ "--!strict", "export type", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
what is the difference between wait() and task.wait()? should i stop using wait()
Yes, stop using `wait()`. The global `wait()`, `spawn()`, `delay()`, and `delay` are legacy scheduler functions built on the old thread pool. `task.wait()` is the modern replacement. Key differences: - `task.wait()` resumes on the same heartbeat-aligned scheduler the engine uses for `RunService`, so timing is consiste...
{ "id": "atmos-language-and-core-luau-intermediate-1002", "category": "language-and-core-luau", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "task-library", "scheduler", "deprecated-apis" ], "engine_context": { "luau_features": [ "task.wait", "task.spaw...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
write a generic typed queue module that works for any element type T
Use a generic type parameter `<T>` on the function that creates the queue. Luau supports generics on both functions and types, so the queue can be type-safe for whatever element type the caller uses. ```lua --!strict export type Queue<T> = { push: (self: Queue<T>, item: T) -> (), pop: (self: Queue<T>) -> T?, ...
{ "id": "atmos-language-and-core-luau-advanced-1003", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "advanced", "topics": [ "generics", "typed-luau", "module-pattern" ], "engine_context": { "luau_features": [ "generic type parameters", "expo...
You are Atmos, reviewing Roblox Luau code as a senior engineer would. Identify the root cause precisely before proposing a fix, distinguish symptoms from causes, and explain why the fix works, not just what changed.
my script errors with 'attempt to index nil with ...' on this line: local name = player.Data.Name. how do i fix it
The error means one of the chained lookups resolved to `nil`. Going `player.Data.Name` with no guards will crash if `player`, `player.Data`, or `player.Data.Name` is missing. In `--!strict` this would fail to type-check; in non-strict it crashes at runtime. Root cause: you are assuming the whole path exists. The fix i...
{ "id": "atmos-language-and-core-luau-beginner-1004", "category": "language-and-core-luau", "task_type": "debugging", "difficulty": "beginner", "topics": [ "nil-safety", "FindFirstChild", "error-handling" ], "engine_context": { "luau_features": [ "nil-checking", "--!strict" ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
show me the standard ModuleScript pattern where a module returns a table of functions and holds private state
The conventional module pattern is a `ModuleScript` that builds a local `module` table, attaches functions to it, and returns it. Private (upvalue) state lives in the module's closure and is not exposed on the returned table. ```lua --!strict -- ServerScriptService/Combat/CombatService.server.lua -> actually a ModuleS...
{ "id": "atmos-language-and-core-luau-intermediate-1005", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "module-pattern", "ModuleScript", "closures" ], "engine_context": { "luau_features": [ "require", "closures",...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
implement a small class with metatables and method inheritance, typed
Use a metatable-based class where the class table holds methods and `__index` points back to it. Constructors call `setmetatable(instance, Class)`. For inheritance, set the child's metatable `__index` to the parent so missing methods fall through. ```lua --!strict export type Animal = typeof(setmetatable({} :: { n...
{ "id": "atmos-language-and-core-luau-advanced-1006", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "advanced", "topics": [ "oop", "metatables", "inheritance", "typed-luau" ], "engine_context": { "luau_features": [ "setmetatable", "__ind...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
review this data-load function. is my pcall usage correct? local ok, data = pcall(function() return DataStore:GetAsync(key) end) if ok then print(data) else warn('fail') end
The `pcall` itself is correct in form, but there are three problems with how the result is used. 1. You swallow the error. In the `else` branch you warn 'fail' but discard the actual error message returned as the second value. Always capture and log it. 2. `GetAsync` is a network call; wrapping it in a bare `pcall` wi...
{ "id": "atmos-language-and-core-luau-intermediate-1007", "category": "language-and-core-luau", "task_type": "code_review", "difficulty": "intermediate", "topics": [ "pcall", "error-handling", "DataStore" ], "engine_context": { "luau_features": [ "pcall", "retry pattern" ],...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i need to run several async tasks and wait for all of them. should i use coroutines or task library?
Use the `task` library, not raw coroutines, because `task` integrates with the engine scheduler while `coroutine` does not resume automatically. For 'wait for all', launch each unit of work with `task.spawn` and join them with a counter, or chain with promises if you already use a promise library. Here is a join-all p...
{ "id": "atmos-language-and-core-luau-advanced-1008", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "advanced", "topics": [ "task-library", "coroutines", "concurrency" ], "engine_context": { "luau_features": [ "task.spawn", "BindableEvent", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
my table insert is causing lag every frame help. i do table.insert(playerList, p) every heartbeat and then rebuild a string
The lag is almost certainly from per-frame allocation, not `table.insert` itself. Two common culprits: (1) creating a brand-new table every frame instead of reusing one, and (2) building a string by concatenation in a loop, which allocates a new string each iteration. Fix both by reusing a buffer table with `table.clea...
{ "id": "atmos-language-and-core-luau-intermediate-1009", "category": "language-and-core-luau", "task_type": "optimization", "difficulty": "intermediate", "topics": [ "tables", "table.clear", "performance", "allocation" ], "engine_context": { "luau_features": [ "table.clear", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do type packs (T...) work in luau? give an example of a function that forwards varargs with their types preserved
Luau supports type packs, written `<T...>`, which represent a sequence of types rather than a single type. They let you write functions that accept and forward an arbitrary, type-checked list of arguments - the classic use case is a typed `wrap`/`call` helper. ```lua --!strict local function wrap<A..., R...>(fn: (A......
{ "id": "atmos-language-and-core-luau-advanced-1010", "category": "language-and-core-luau", "task_type": "explanation", "difficulty": "advanced", "topics": [ "type-packs", "generics", "variadic" ], "engine_context": { "luau_features": [ "type packs <T...>", "generic functions",...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
explain lua string patterns. how do i pull the first number out of a string like 'Level 42 reached'?
Luau string patterns are a lightweight regex-like mini-language (not full PCRE). `%d` matches a digit, `%a` a letter, `%s` whitespace, and captures inside `()` are returned by `string.match`. Use `string.match` (not `string.find`) when you want the captured text rather than positions. ```lua --!strict local text = "Le...
{ "id": "atmos-language-and-core-luau-beginner-1011", "category": "language-and-core-luau", "task_type": "explanation", "difficulty": "beginner", "topics": [ "string-patterns", "string-match" ], "engine_context": { "luau_features": [ "string.match", "patterns", "tonumber" ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
whats the right way to do randomness in luau? i keep getting the same sequence with math.random
Use the `Random` object, not the global `math.random`, for gameplay. `math.random` shares global state and only gets a decent seed from `math.randomseed`, which many scripts call and which can cause correlated streams. `Random.new()` creates an independent, seedable stream per instance. ```lua --!strict local rng = Ra...
{ "id": "atmos-language-and-core-luau-intermediate-1012", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "random", "math", "Random-object" ], "engine_context": { "luau_features": [ "Random.new", "NextInteger", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do union and intersection types work? i want a function that accepts either a player or a userId number
A union type `A | B` means 'value is one of these', and Luau lets you narrow on it with type guards. There is no intersection literal syntax for values the way some languages have, but you express 'must satisfy both' through intersection types `A & B` in type declarations. For your case, a union plus narrowing is the r...
{ "id": "atmos-language-and-core-luau-advanced-1013", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "advanced", "topics": [ "union-types", "type-narrowing", "intersection-types" ], "engine_context": { "luau_features": [ "union types", "type ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
write a parallel luau actor that processes a big list of positions off the main thread, then syncs results back
Parallel Luau runs inside an `Actor` instance and switches between parallel and serial contexts with `task.desynchronize`/`task.synchronize`. You can do heavy computation in parallel, then briefly synchronize to touch engine objects (which are not safe to mutate from parallel code). ```lua --!strict -- ServerScriptSer...
{ "id": "atmos-language-and-core-luau-expert-1014", "category": "language-and-core-luau", "task_type": "implementation", "difficulty": "expert", "topics": [ "parallel-luau", "actors", "task-synchronize" ], "engine_context": { "luau_features": [ "Actor", "task.desynchronize", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
im passing a callback to my module but the self context is lost. how do callbacks and self work in luau?
The classic trap: `table:method()` calls with `self`, but when you pass `obj:method` as a callback you pass the function without its `self`. Either bind it or use a closure. ```lua --!strict local Handler = {} Handler.__index = Handler function Handler.new() return setmetatable({ count = 0 }, Handler) end functi...
{ "id": "atmos-language-and-core-luau-intermediate-1015", "category": "language-and-core-luau", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "callbacks", "self", "closures", "events" ], "engine_context": { "luau_features": [ "self", "closures", ...
You are Atmos, profiling and optimizing a Roblox experience. Ground every recommendation in a concrete mechanism (allocation, replication cost, physics step, render batching) rather than generic advice, and note the tradeoffs of any optimization you suggest.
how do i actually use the microprofiler to find whats slowing down my game? give a concrete workflow
The MicroProfiler captures a rolling buffer of engine and script labels you can scrub through. Concrete workflow: 1. In Studio, open View -> Micro Profiler (or press Ctrl+Alt+F6 / Ctrl+P in a live session) and click the red record button. Reproduce the slow moment. 2. Stop, then scrub the timeline. Labels are nested: ...
{ "id": "atmos-engineering-practice-intermediate-2001", "category": "engineering-practice", "task_type": "optimization", "difficulty": "intermediate", "topics": [ "microprofiler", "profiling", "debug.profilebegin" ], "engine_context": { "luau_features": [ "debug.profilebegin", ...
You are Atmos, profiling and optimizing a Roblox experience. Ground every recommendation in a concrete mechanism (allocation, replication cost, physics step, render batching) rather than generic advice, and note the tradeoffs of any optimization you suggest.
my game creates a lot of short-lived tables and i think GC is spiking. how do i reduce allocation and GC pressure in luau
GC spikes come from allocating per-frame ephemeral objects - tables, strings, Vector3s, closures - faster than the collector can reclaim them. Reduce by reusing buffers and hoisting constants out of loops. ```lua --!strict local RunService = game:GetService("RunService") -- Reuse one table instead of allocating each ...
{ "id": "atmos-engineering-practice-advanced-2002", "category": "engineering-practice", "task_type": "optimization", "difficulty": "advanced", "topics": [ "allocation", "garbage-collection", "buffer" ], "engine_context": { "luau_features": [ "table.clear", "buffer", "hois...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
whats a clean module architecture for a medium roblox game? i have scripts everywhere talking to each other
Adopt a service-oriented structure where each system is a `ModuleScript` that owns its state and exposes a small public API; scripts `require` services rather than reaching into each other. Put shared services under `ServerScriptService/Modules` and client services under `StarterPlayer/StarterPlayerScripts/Modules`. `...
{ "id": "atmos-engineering-practice-intermediate-2003", "category": "engineering-practice", "task_type": "architecture", "difficulty": "intermediate", "topics": [ "module-architecture", "project-structure", "services" ], "engine_context": { "luau_features": [ "require", "Module...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
explain render batching simply. why does my game with 500 unanchored parts run fine but 500 separate gui frames lag?
Render batching groups draw calls so the GPU processes many similar objects in one pass. Instances that share a material/mesh and transform type are batched automatically by the engine; things that break batching (distinct materials, SurfaceGuis, individual UI strokes, shadows, transparency sorting) each cost a separat...
{ "id": "atmos-engineering-practice-beginner-2004", "category": "engineering-practice", "task_type": "explanation", "difficulty": "beginner", "topics": [ "render-batching", "draw-calls", "ui-performance" ], "engine_context": { "luau_features": [], "services": [ "Workspace", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
write a testez test for my coin economy module including a failure case
TestEZ uses `describe`/`it` blocks and `expect(...):toBe(...)` matchers, run from a `Packages` setup or the TestEZ CLI. Structure your module so it is requireable without the data model (inject dependencies) to keep tests fast and hermetic. ```lua --!strict -- Modules/EconomyService.spec.lua return function() loca...
{ "id": "atmos-engineering-practice-advanced-2005", "category": "engineering-practice", "task_type": "testing", "difficulty": "advanced", "topics": [ "testez", "unit-testing", "dependency-injection" ], "engine_context": { "luau_features": [ "describe", "it", "expect", ...
You are Atmos, reviewing Roblox Luau code as a senior engineer would. Identify the root cause precisely before proposing a fix, distinguish symptoms from causes, and explain why the fix works, not just what changed.
review this loop. it feels wrong: for i = 1, #list do if list[i].active then table.remove(list, i) end end
Root cause: you are mutating `list` with `table.remove` while iterating forward with `#list`. When you remove element `i`, every later element shifts down by one, so the next iteration skips the element that moved into position `i`. You will silently skip items and, depending on timing, can also read a `nil` if the lis...
{ "id": "atmos-engineering-practice-intermediate-2006", "category": "engineering-practice", "task_type": "code_review", "difficulty": "intermediate", "topics": [ "code-review", "table-iteration", "table.remove" ], "engine_context": { "luau_features": [ "table.remove", "ipairs",...
You are Atmos, profiling and optimizing a Roblox experience. Ground every recommendation in a concrete mechanism (allocation, replication cost, physics step, render batching) rather than generic advice, and note the tradeoffs of any optimization you suggest.
every player in my game has a folder of 20 values replicated to the client. with 30 players that feels heavy. how do i reduce replication cost?
Replication cost is driven by (a) the number of distinct instances synced and (b) how often their properties change. 30 players x 20 values = 600 replicated instances, each with its own change-tracking overhead on the network and the client's instance tree. Reduce by collapsing many values into fewer containers and by ...
{ "id": "atmos-engineering-practice-expert-2007", "category": "engineering-practice", "task_type": "optimization", "difficulty": "expert", "topics": [ "replication-cost", "attributes", "networking" ], "engine_context": { "luau_features": [ "SetAttribute", "task.defer", "I...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
refactor this messy spawn script into something maintainable and typed
Here is the before (messy) and after (typed, modular). The messy version mixes spawning logic, configuration, and instance creation in one long `Script`. Before: ```lua -- messy game.Players.PlayerAdded:Connect(function(p) spawn(function() wait(2) local m = Instance.new("Model") m.Name = p....
{ "id": "atmos-engineering-practice-intermediate-2008", "category": "engineering-practice", "task_type": "refactor", "difficulty": "intermediate", "topics": [ "refactor", "typed-luau", "module-pattern" ], "engine_context": { "luau_features": [ "task.delay", "export type", ...
You are Atmos, reviewing Roblox Luau code as a senior engineer would. Identify the root cause precisely before proposing a fix, distinguish symptoms from causes, and explain why the fix works, not just what changed.
my remote event handler errors only sometimes with 'nil argument'. the client sends a table. whats wrong?
The intermittent `nil argument` is the signature of a race between replication/serialization and the remote firing, or of sending an un-replicatable value. Remotes serialize their arguments across the network, and not everything survives that trip. Common causes: 1. You send a `table` containing `Instance` references ...
{ "id": "atmos-engineering-practice-beginner-2009", "category": "engineering-practice", "task_type": "debugging", "difficulty": "beginner", "topics": [ "remote-events", "serialization", "server-validation" ], "engine_context": { "luau_features": [ "FireServer", "OnServerEvent",...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how should i structure a large project so server and client code do not get tangled? give a real layout
Separate the network boundary explicitly: shared code (pure logic, types, config) lives in a `Shared` module set required by both sides; server-only and client-only code never import each other directly. Communication crosses only through remotes. ``` ReplicatedStorage/ Shared/ Types.luau (export type d...
{ "id": "atmos-engineering-practice-advanced-2010", "category": "engineering-practice", "task_type": "architecture", "difficulty": "advanced", "topics": [ "project-structure", "shared-modules", "network-boundary" ], "engine_context": { "luau_features": [ "export type", "require...
You are Atmos, profiling and optimizing a Roblox experience. Ground every recommendation in a concrete mechanism (allocation, replication cost, physics step, render batching) rather than generic advice, and note the tradeoffs of any optimization you suggest.
should i update a part's CFrame every frame or use physics? what are the performance tradeoffs for moving 200 objects
It depends on whether the objects must interact with the physics simulation. Setting `CFrame` directly (kinematic) skips the solver but bypasses collisions; using physics (`Velocity`, `BodyMovers`/`AlignPosition`, constraints) lets the engine resolve contacts but costs solver time per body. Performance tradeoffs for ~...
{ "id": "atmos-engineering-practice-intermediate-2011", "category": "engineering-practice", "task_type": "optimization", "difficulty": "intermediate", "topics": [ "physics", "performance-tradeoffs", "CFrame" ], "engine_context": { "luau_features": [ "CFrame", "RunService.Heartb...
You are Atmos, profiling and optimizing a Roblox experience. Ground every recommendation in a concrete mechanism (allocation, replication cost, physics step, render batching) rather than generic advice, and note the tradeoffs of any optimization you suggest.
i have a compute-heavy loop over 10k entities. can parallel lua actually help and how do i split the work across actors?
Yes, but only the compute portion - Parallel Luau lets multiple actors run simultaneously on different threads, so splitting independent entity work across actors can give near-linear speedup for pure math. The hard rule: you cannot touch `Instance` properties from parallel code, so the entity data must live in plain L...
{ "id": "atmos-engineering-practice-expert-2012", "category": "engineering-practice", "task_type": "architecture", "difficulty": "expert", "topics": [ "parallel-luau", "actors", "data-parallelism" ], "engine_context": { "luau_features": [ "Actor", "SendMessage", "task.des...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
explain nil-safety in luau simply. why does --!strict keep complaining about nil and how do i satisfy it without just adding tons of asserts
`--!strict` tracks whether a value can be `nil` and refuses to let you use it where a non-nil is required. The complaints are the compiler forcing you to prove a value exists before use. You do not need piles of `assert`; you need the right narrowing construct for each case. Tools, in order of preference: 1. Guard wit...
{ "id": "atmos-engineering-practice-beginner-2013", "category": "engineering-practice", "task_type": "explanation", "difficulty": "beginner", "topics": [ "nil-safety", "strict-mode", "type-narrowing" ], "engine_context": { "luau_features": [ "--!strict", "nil narrowing", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
do a security review of this coin-give remote. client calls remote and server just does player.Coins.Value += amount
This is an exploitable pattern. The server trusting `amount` from the client lets any exploit client grant itself unlimited coins. The server must never accept client-specified quantities for valuable state. Problems: 1. `amount` is fully attacker-controlled; nothing stops `FireServer(99999999)`. 2. Even the existence...
{ "id": "atmos-engineering-practice-advanced-2014", "category": "engineering-practice", "task_type": "security_review", "difficulty": "advanced", "topics": [ "security", "server-authoritative", "remote-validation" ], "engine_context": { "luau_features": [ "OnServerEvent", "Fire...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
write a testez suite that checks my data validator rejects bad input and accepts good input, with a stubbed datastore
Keep the validator pure and inject the data layer so tests need no network. Use TestEZ `describe`/`it` with `expect` matchers, including `toThrow` for invalid input. ```lua --!strict -- Modules/PlayerData/Validator.spec.lua return function() local Validator = require(script.Parent.Validator) describe("PlayerD...
{ "id": "atmos-engineering-practice-intermediate-2015", "category": "engineering-practice", "task_type": "testing", "difficulty": "intermediate", "topics": [ "testez", "validation", "unit-testing" ], "engine_context": { "luau_features": [ "describe", "it", "expect", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i have a gui button and i want clicking it to give the player one coin. right now nothing happens. how do i send a message from a local script to the server and handle it on the server in modern luau?
Use a RemoteEvent. The client fires it with no arguments; the server listens with OnServerEvent and is the only place that mutates the wallet. ```lua -- ReplicatedStorage/RemoteEvents/AddCoin (RemoteEvent) -- LocalScript inside the button: local ReplicatedStorage = game:GetService("ReplicatedStorage") local addCoin =...
{ "id": "atmos-client-server-networking-beginner-1001", "category": "client-server-networking", "task_type": "implementation", "difficulty": "beginner", "topics": [ "remote-event", "fire-server", "on-server-event", "client-to-server" ], "engine_context": { "luau_features": [ "typ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
how do i send a remote event from the server back to only one specific player (like their own result), not everyone?
Use RemoteEvent:FireClient(player, ...) to target exactly one player. Reserve FireAllClients for things that are genuinely global (leaderboard updates, round start). ```lua -- ServerScriptService/Reward.server.lua --!strict local ReplicatedStorage = game:GetService("ReplicatedStorage") local rewardEvent = ReplicatedSt...
{ "id": "atmos-client-server-networking-beginner-1002", "category": "client-server-networking", "task_type": "implementation", "difficulty": "beginner", "topics": [ "fire-client", "remote-event", "targeted-messaging" ], "engine_context": { "luau_features": [ "typed-luau", "--!s...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i need the client to ask the server a question and get a value back, like a shop price lookup. what's the right remote and how do i use it without freezing the client?
Use a RemoteFunction. The client calls InvokeServer(...) which yields until the server returns a value from OnServerInvoke. ```lua -- ReplicatedStorage/RemoteFunctions/GetPrice (RemoteFunction) -- Client (yields until the server answers): local price = getPrice:InvokeServer("Sword") -- Server: --!strict local ShopPr...
{ "id": "atmos-client-server-networking-intermediate-1003", "category": "client-server-networking", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "remote-function", "invoke-server", "on-server-invoke", "request-response" ], "engine_context": { "luau_features": [...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i spawn a physics part on the server that the player should push around. it lags and snaps back to the server position. what's network ownership and how do i fix it?
By default the server simulates every part's physics. For a part a single player is interacting with, give that client network ownership so it simulates locally and feels smooth, then return it to the server when done. ```lua -- ServerScriptService/Physics.server.lua --!strict local part = workspace:WaitForChild("Push...
{ "id": "atmos-client-server-networking-intermediate-1004", "category": "client-server-networking", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "network-ownership", "set-network-owner", "physics-replication" ], "engine_context": { "luau_features": [ "typed-l...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
explain InvokeClient and when i should avoid it. i want the server to ask a specific client for something.
RemoteFunction:InvokeClient(player, ...) lets the server call into a client and wait for a return, but it is fragile. Prefer FireClient plus a callback RemoteEvent instead. ```lua -- Preferred pattern (no server thread can be hung by a bad client): requestEvent:FireClient(player, requestId) -- client does work, then r...
{ "id": "atmos-client-server-networking-intermediate-1005", "category": "client-server-networking", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "invoke-client", "remote-function", "server-to-client" ], "engine_context": { "luau_features": [ "typed-luau", ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
my remote handler sometimes runs twice for one click and gives double rewards. how do i debounce or rate-limit on the server?
Client-side debounce is only for UX. The only reliable guard is a server-side cooldown keyed by the player's UserId. Exploiters can fire your remote as fast as they like. ```lua --!strict local lastFire: {[number]: number} = {} local COOLDOWN = 1.0 rewardRemote.OnServerEvent:Connect(function(player: Player) local...
{ "id": "atmos-client-server-networking-intermediate-1006", "category": "client-server-networking", "task_type": "implementation", "difficulty": "intermediate", "topics": [ "server-debounce", "rate-limit", "anti-spam", "cooldown" ], "engine_context": { "luau_features": [ "typed-l...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
what's the difference between a BindableEvent and a RemoteEvent and when would i actually use a BindableEvent?
A RemoteEvent crosses the client/server boundary over the network. A BindableEvent is an in-memory event used for communication between scripts that live on the SAME side (both on the server, or both on a client). It never touches the network. ```lua -- ServerScriptService/Comms.server.lua local signal = Instance.new(...
{ "id": "atmos-client-server-networking-intermediate-1007", "category": "client-server-networking", "task_type": "explanation", "difficulty": "intermediate", "topics": [ "bindable-event", "remote-event", "in-server-comms", "architecture" ], "engine_context": { "luau_features": [ ...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i'm building a player-owned vehicle. i want smooth client control but server authority. how should i handle network ownership handoff when the player enters and exits the seat?
Give the seated player network ownership of the vehicle model's primary part on enter, and return it to the server on exit. The server still validates the result before anything competitive happens. -- ServerScriptService/Vehicle.server.lua --!strict local function onEnter(seat: VehicleSeat, player: Player) if sea...
{ "id": "atmos-client-server-networking-advanced-1008", "category": "client-server-networking", "task_type": "architecture", "difficulty": "advanced", "topics": [ "network-ownership", "vehicle", "ownership-handoff", "server-authority" ], "engine_context": { "luau_features": [ "ty...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
explain client-side prediction vs server reconciliation for movement, and give a simple server-authoritative approach in luau.
Server-authoritative means the server simulates the true position; the client only sends input intents. To avoid laggy controls, the client predicts its own motion locally while the server corrects it (reconciliation). -- Client: send intent, predict locally moveRemote:FireServer(inputVector, os.clock()) character:Tra...
{ "id": "atmos-client-server-networking-advanced-1009", "category": "client-server-networking", "task_type": "architecture", "difficulty": "advanced", "topics": [ "client-prediction", "server-reconciliation", "authoritative-movement", "netcode" ], "engine_context": { "luau_features": [...
You are Atmos, an expert Roblox Studio and Luau engineering assistant. You write production-ready, typed Luau that follows Roblox's current best practices, explain the reasoning behind non-obvious design decisions, and default to server-authoritative, exploit-resistant patterns for anything touching gameplay state.
i have many server scripts that need to talk to each other. should i use one big RemoteEvent or many BindableEvents? give me a clean architecture.
Neither a single RemoteEvent (that is for the network boundary) nor one giant BindableEvent with a stringly-typed switch scales well. Use one BindableEvent per domain, or an event hub with typed handlers. -- ServerScriptService/EventHub.server.lua --!strict export type Handler = (...any) -> () local handlers: {[string...
{ "id": "atmos-client-server-networking-advanced-1010", "category": "client-server-networking", "task_type": "architecture", "difficulty": "advanced", "topics": [ "event-hub", "bindable-event", "script-comms", "modular-architecture" ], "engine_context": { "luau_features": [ "type...
End of preview. Expand in Data Studio

Atmos-dataset-v1

Atmos-dataset-v1 is a high-quality supervised fine-tuning dataset for Roblox Luau coding assistants.

Features

  • Production-ready Luau
  • Modern Roblox APIs
  • Multi-system engineering tasks
  • Client/server architecture
  • UI engineering
  • Debugging
  • Plugin development
  • Networking
  • DataStores

Format

JSONL

Fields:

  • system
  • instruction
  • response
  • metadata

License: Apache-2.0

Downloads last month
6