getrenderproperty Synchronous

Read a drawing property using its name as a string. This is useful when a settings table or other code chooses which property to inspect. The getter returns the current property value and does not change the object. It accepts data-property names, not method names such as Remove.

Syntax
Luau
getrenderproperty(object: DrawingObject, property: string) -> any

Parameters

Function parameters
ParameterTypeDescription
objectDrawingObjectAn existing drawing object.
propertystringData property to read, such as Radius, Visible, or Color.

Returns

any

The stored property value, using the type required by that property.

Usage notes

Unknown property names raise an error. Text accepts Centered as an alias for Center and Outlined as an alias for Outline.

Transparency uses Kawaii’s opacity scale: 0 is invisible and 1 is fully opaque.

Differences from sUNC

sUNC describes this as equivalent to object[property]. Kawaii’s helper only reads data properties: method names such as Remove or Create are rejected.

The helper rejects removed drawings. Directly reading object.__OBJECT_EXISTS can still return false after removal.

Example

Example
Luau
local circle = Drawing.new("Circle")
circle.Radius = 24
print(getrenderproperty(circle, "Radius")) -- 24
circle:Remove()
Kawaii documentation