Entity
Defined in: client/api.d.ts:5452
Base handle for a live replicated network entity.
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Entity(
id):Entity
Defined in: client/api.d.ts:5457
Creates a script wrapper for an existing entity with this ID; it does not spawn an entity.
Parameters
Section titled “Parameters”number
Network entity identifier.
Returns
Section titled “Returns”Entity
Methods
Section titled “Methods”toString()
Section titled “toString()”toString():
string
Defined in: client/api.d.ts:5488
Formats this entity handle for logging and debugging.
Returns
Section titled “Returns”string
Text containing the network entity ID.
Properties
Section titled “Properties”
readonlyid:number
Defined in: client/api.d.ts:5462
Immutable network entity identifier.
position
Section titled “position”position:
Vector3
Defined in: client/api.d.ts:5472
Authoritative world-space position; assignment forces replicated state.
rotation
Section titled “rotation”rotation:
Vector3|Quaternion
Defined in: client/api.d.ts:5477
Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.
readonlystate:StateBag
Defined in: client/api.d.ts:5482
Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.
virtualWorld
Section titled “virtualWorld”
readonlyvirtualWorld:number
Defined in: client/api.d.ts:5467
Current virtual-world identifier.