Learn
Engine Class
GenerationService
Not Creatable
Service

Summary
Methods
GenerateMeshAsync(inputs: Dictionary,player: Player,options: Dictionary,intermediateResultCallback: function?):Tuple
Deprecated
Inherited Members

API Reference
Methods
GenerateMeshAsync
Deprecated

GenerateModelAsync
Yields
Capabilities: DynamicGeneration
GenerationService:GenerateModelAsync(
inputs:Dictionary, schema:Dictionary, options:Dictionary?
Parameters
inputs:Dictionary
schema:Dictionary
options:Dictionary?
Returns
Code Samples
Generation of Basic Car Chassis
local GenerationService = game:GetService("GenerationService")
local Workspace = game:GetService("Workspace")
-- Set up inputs for the generated geometry
local inputs = {
TextPrompt = "a green dragon car with 4 wheels"
}
-- Set schema to the predefined five-model car chassis
local schema = {
PredefinedSchema = "Car5"
}
-- Make the call to generate the model
local success, model, metadata = pcall(function()
return GenerationService:GenerateModelAsync(inputs, schema)
end)
if success then
-- Scale model to target size and position near world center
local targetSize = 16
local modelSize = model:GetExtentsSize()
local scaleFactor = targetSize / math.max(modelSize.X, modelSize.Y, modelSize.Z)
model:ScaleTo(scaleFactor)
model:PivotTo(CFrame.new(15, model:GetExtentsSize().Y / 2, 0))
-- Anchor all parts so that the meshes don't fall apart
for _, descendant in model:GetDescendants() do
if descendant:IsA("BasePart") then
descendant.Anchored = true
end
end
-- Name the model and parent it to workspace
model.Name = "BasicDragonCarGeneration"
model.Parent = Workspace
end
Generation With a Custom Schema
local GenerationService = game:GetService("GenerationService")
local Workspace = game:GetService("Workspace")
-- Describe the object to generate
local inputs = {
TextPrompt = "a wooden cart with four wheels",
}
-- Define a custom multi-part structure instead of using a predefined schema.
-- Each entry in `Groups` names a part the generation should produce.
local schema = {
SchemaDefinition = {
Groups = { "body", "wheel_fl", "wheel_fr", "wheel_rl", "wheel_rr" },
},
}
-- Make the call to generate the model
local success, model, metadata = pcall(function()
return GenerationService:GenerateModelAsync(inputs, schema)
end)
if success then
-- Anchor all parts so that the meshes don't fall apart
for _, descendant in model:GetDescendants() do
if descendant:IsA("BasePart") then
descendant.Anchored = true
end
end
-- Name the model and parent it to workspace
model.Name = "CustomSchemaGeneration"
model.Parent = Workspace
end
Generation Conditioned on an Image
local GenerationService = game:GetService("GenerationService")
local Workspace = game:GetService("Workspace")
-- Reference image used to condition the generation. Replace `0` with the asset
-- ID of your own uploaded image.
local imageAssetId = 0
local inputs = {
Image = Content.fromAssetId(imageAssetId),
TextPrompt = "a low-poly treasure chest",
}
-- Produce a single-mesh output
local schema = {
PredefinedSchema = "Body1",
}
-- Make the call to generate the model
local success, model, metadata = pcall(function()
return GenerationService:GenerateModelAsync(inputs, schema)
end)
if success then
-- Anchor all parts so that the meshes don't fall apart
for _, descendant in model:GetDescendants() do
if descendant:IsA("BasePart") then
descendant.Anchored = true
end
end
-- Name the model and parent it to workspace
model.Name = "ImageConditionedGeneration"
model.Parent = Workspace
end

LoadGeneratedMeshAsync
Yields
Capabilities: DynamicGeneration
GenerationService:LoadGeneratedMeshAsync(generationId:string):MeshPart
Parameters
generationId:string
Returns

©2026 Roblox Corporation. Roblox, the Roblox logo and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.