Noverwyn Documentation
API set:
148

‹ All natives

Namespace: ENTITY API set: server Language: Luau Improve

entities.create

entities.create(def: { position: Position, kind: string?, name: string?, bucket: number?, props: { [string]: any }? }): Entity

Creates an entity in the world.

Field Type Role
position Position required: {x, y, z}, {x = 1, y = 2, z = 0} or vector
kind string free kind: cauldron, broom… object by default
name string name, 64 characters at most
bucket number 0 by default
props table public properties set right away

Parameters#

  • def (table): see the fields below

Returns#

Entity: the created entity

Example#

local cauldron = entities.create({
	kind = "cauldron",
	name = "Big cauldron",
	position = { 6, 11, 0 },
	bucket = 101,
	props = { full = true },
})

Notes#

  • The entity is deleted when the script stops.
  • An error is raised if world.maxEntities is reached.

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