MCP // ROBLOX STUDIO
Roblox Studio MCP for fire, smoke and explosion effects
Connect your agent to Spatial Compiler's hosted MCP server to compile 1024 px fire, smoke, explosion and dust flipbooks for Roblox Studio. Upload the image and set a ParticleEmitter to an 8 x 8 grid by hand.
- Godot 4 Available
- Unity Manual setup
- Unreal Engine Manual setup
- Roblox Studio Manual setup
- three.js Available
A draft compile is from $0.05, and new accounts start with $5 of usage.
01 // WHAT YOU GET
A flipbook sized for Roblox
MCP is the protocol your agent uses to call tools. Spatial Compiler's server runs hosted, outside Roblox Studio, and your agent calls it from your MCP client.
Roblox limits uploaded images to 1024 x 1024 px, and the default compile is 2048 px. Ask your agent to compile with export.tile_px = 128, which keeps the 8 x 8 grid of 64 frames on one 1024 px image.
A ParticleEmitter takes one texture and no custom shader, so also ask for export.pack to write the light from above into RGB and opacity into alpha. You get one RGBA image with the smoke shaded from above. Flame goes on a second emitter, from an image on black of the flame color (main_colour.png) times its brightness (the squared alpha of main_neg.png). That image is normalized to the clip's peak, so its emitter's Brightness goes to scales.emit_max_hdr from layout.json.
02 // HOW TO
Set up the emitter in Roblox Studio
- Add the hosted server,
https://spatialcompiler.dev/mcp, to your MCP client, sign in, and ask your agent for the effect atexport.tile_px = 128, packed into one RGBA image. - Upload the PNG as an image asset in Roblox Studio and copy its asset id.
- Insert an Attachment in a Part and a
ParticleEmitterin the Attachment, then setTextureto the asset id andFlipbookLayoutto Grid8x8. - For the fire loop, set
FlipbookModeto Loop andFlipbookFramerateto 30, the Roblox maximum, which plays the 64 frames in 2.13 s. For an explosion, set it to OneShot so the frames play once, evenly spaced overLifetime, and ask for the compile withexport.pacing = "even"to match. - For flame glow, put the flame image on its own emitter on the same Attachment, with
LightEmission1,LightInfluence0 andBrightnessatscales.emit_max_hdr. For smoke, keepLightEmissionat 0 andLightInfluenceat 1 so the scene's light darkens it. - For a one-shot, set
Rateto 0 on each emitter and callEmit(1)on both from the same script call. The shared call lines up their first frames, and identical fixed settings keep each flame on its smoke:Speed0,SpreadAngle0, the sameLifetime,Size,OrientationandRotation, one fixedFlipbookFramerateandFlipbookStartRandomoff.
{
"mcpServers": {
"spatial-compiler": {
"type": "http",
"url": "https://spatialcompiler.dev/mcp"
}
}
}
-- Script inside the Part; the smoke and flame ParticleEmitters share its Attachment
local part = script.Parent
local attachment = part:FindFirstChildOfClass("Attachment")
local function explode()
for _, emitter in attachment:GetChildren() do
if emitter:IsA("ParticleEmitter") then
emitter:Emit(1) -- one call, so both start on frame 0
end
end
end
-- call explode() from your own event, here the first touch
part.Touched:Once(explode)
03 // REAL OUTPUT
Real compiles at full size
The fire loops every 2 s and the impact plays once in 2.0 s. At export.tile_px = 128 each frame is 128 px across.
Does Roblox Studio have an MCP server for effects?
Roblox offers an MCP server for Studio and Spatial Compiler runs as a separate hosted server in your MCP client to compile flipbooks.
How do I set up a Roblox MCP for fire and explosion effects?
Add the hosted Spatial Compiler URL to your MCP client, sign in and ask for export tile size 128 to fit 1024 px.
How do I set the rows and columns of a Roblox particle flipbook?
Set FlipbookLayout to Grid8x8 on the ParticleEmitter to match a default 64 frame compile or use Grid2x2, Grid4x4 or Custom.
How do I play a Roblox explosion flipbook only once?
Compile with even pacing, set FlipbookMode to OneShot, set Rate to 0 and call Emit with 1 when the explosion triggers.
Why is my Roblox MCP connection not working?
Restart your MCP client after adding the server and finishing browser login. Check for 401 invalid key or 429 hourly limit errors.
Compile your first effect
You pay per compile and see the price before it runs. New accounts start with $5 of usage.