Noverwyn Documentation
API set:
148

‹ All natives

Namespace: ENTITY API set: server Language: Luau Improve

entity:set

Also: player:set

entity:set(key: string, value: any, scope: string?)

Sets a synchronised property on the entity.

Scope Who receives it
public everyone who sees the entity
private only the player concerned
server nobody: it never leaves the server

Parameters#

  • key (string): name, 64 characters at most
  • value (any): nil (erases), boolean, number or text of 1024 characters at most
  • scope (string, optional): "public" (default), "private" or "server"

Example#

player:set("house", "Brightmoon")
player:set("money", 120, "private")
player:set("warnings", 2, "server")

Notes#

  • At most 64 properties per entity; beyond that, an error is raised.
  • account, vip and vip.… are reserved: use player:wearVip.
  • Properties are shared between the server's scripts. This is how scripts communicate.
  • Nothing is saved: they disappear with the entity.

See also#

Namespace: PLAYER

Namespace: ENTITY

Namespace: ZONE

Namespace: TIME

Namespace: SCRIPT

Namespace: EVENT

Namespace: CLIENT

Namespace: CLIENT EVENT

Namespace: UNIFORM

Namespace: WAND

Namespace: LOOK

Namespace: CONTROL

Namespace: GAIT

Namespace: VOICE

Namespace: ATELIER

Namespace: TOOL