nanos world API Reference Unofficial documentation
Function Client Moderate

Paintable:SetMaterialFromCanvas

Sets the material at the specified index of this Actor to a Canvas object

Syntax

Lua
my_paintable:SetMaterialFromCanvas(canvas, index = -1)

Parameters

Name Type Default Description
canvas Canvas The Canvas object to use as a material
index optional integer -1 The material index to apply (<code>-1</code> means all indices)