ModelData:getMeshMaterial
EditReturns the index of the material used by a mesh part. Meshes can be split into multiple parts, and each part can have its own material.
material = ModelData:getMeshMaterial(mesh, part)Arguments
| Name | Type | Default | Description |
| mesh | number | The index of a mesh. | |
| part | number | 1 | The index of a part. |
Returns
| Name | Type | Description |
| material | number | nil | The index of the material applied to the part, or nil if the part does not have a material. |