# ProceduralModel

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Model](https://rapi.sleaze.dev/classes/Model.md), [PVInstance](https://rapi.sleaze.dev/classes/PVInstance.md), [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: BaseParts
- HTML page: https://rapi.sleaze.dev/classes/ProceduralModel/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/ProceduralModel

Procedural models support edit-time procedural generation. Instead of manually constructing model content, a procedural model generates its contents automatically in response to parameter changes.

## Properties

### Dirty

```luau
ProceduralModel.Dirty: boolean = false
```

- Tags: Hidden, Not scriptable, Capabilities: Basic

### GenerationError

```luau
ProceduralModel.GenerationError: string = ""
```

- Tags: Read only, Capabilities: Basic, Save only

Stores errors that the generator module might encounter during generation.

### Generator

```luau
ProceduralModel.Generator: ModuleScript
```

- Tags: Capabilities: Basic

A reference to a [`ModuleScript`](https://rapi.sleaze.dev/classes/ModuleScript.md) that contains code which defines how the [`ProceduralModel`](https://rapi.sleaze.dev/classes/ProceduralModel.md) generates its contents in response to parameter changes.

### Size

```luau
ProceduralModel.Size: Vector3 = Vector3.new(12, 12, 12)
```

- Tags: Capabilities: Basic

Defines the bounding volume used for generation.

## Methods

### ForceGeneration

```luau
ProceduralModel:ForceGeneration(): boolean
```

- Tags: Capabilities: Basic

Immediately runs any pending generation instead of waiting for the scheduled regeneration.

Returns: Whether the [`ProceduralModel`](https://rapi.sleaze.dev/classes/ProceduralModel.md) is up to date after the call: `true` if generation completed successfully or nothing needed to be regenerated, `false` otherwise.

### WaitForGenerationAsync

```luau
ProceduralModel:WaitForGenerationAsync(): boolean
```

- Tags: Yields, Capabilities: Basic

Waits for generation to complete after making parameter changes.

Returns: Was the generation successful?

## Inherited members

- From [Model](https://rapi.sleaze.dev/classes/Model.md): `LevelOfDetail`, `ModelStreamingMode`, `LodEntity`, `ModelMeshCFrame`, `ModelMeshData`, `ModelMeshSize`, `NeedsPivotMigration`, `SlimAnimationTarget`, `SlimHash`, `PrimaryPart`, `Scale`, `ScaleFactor`, `WorldPivot`, `WorldPivotData`, `AddPersistentPlayer`, `GetBoundingBox`, `GetExtentsSize`, `GetPersistentPlayers`, `GetScale`, `MoveTo`, `RemovePersistentPlayer`, `ScaleTo`, `TranslateBy`, `BreakJoints`, `GetModelCFrame`, `GetModelSize`, `GetPrimaryPartCFrame`, `MakeJoints`, `ResetOrientationToIdentity`, `SetIdentityOrientation`, `SetPrimaryPartCFrame`, `breakJoints`, `makeJoints`, `move`, `moveTo`
- From [PVInstance](https://rapi.sleaze.dev/classes/PVInstance.md): `Pivot Offset`, `Origin`, `GetPivot`, `PivotTo`
- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
