Model

self:set_visible

Shared

Sets whether the model is visible

Syntax

local status = self:set_visible(
    visible
)

Parameters

TypeNameDescription
boolvisibletrue to show the entity, false to hide it

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Toggle visibility of a model
core.model.load("character", "models/character.glb")

local entity = core.model.create("character")

entity:set_visible(false)

On this page