natiny.model.set_part_texture

Lua
natiny.model.set_part_texture(model, part [, texture])

Overrides the texture of one part of the model, in place of the one the mesh loaded for it.

Parameters

Name Type Default Description
model number Model handle
part integer Zero-based part index; negative values are clamped to 0
texture number 0 Texture handle, or 0 to inherit the mesh part texture

Example

Lua
natiny.model.set_part_texture(crate, 0, label)