nanos world API Reference Unofficial documentation
Function Shared Fast

Entity:SetValue

Sets a value in this Entity, which can be accessed by any package (optionally sync on clients if called from server)<br><br>Please refer to <a href="/docs/core-concepts/scripting/entity-values">Entity Values</a> for more information

Syntax

Lua
my_entity:SetValue(key, value, sync_on_clients = false)

Parameters

Name Type Default Description
key string
value any
sync_on_clients optional boolean false Server side parameter, if enabled will sync this value with all clients