Skip to main content

Script

Client Server

Script component. Not to be confused with the actual lua table instance of the script referred to as self.

Metamethods

boolean __eq(Script a, Script b)

Methods

nil setSerializeVar(string key, any value)

integer RPC(string funcName, ... args)

string GetNetworkFlow()

string GetScriptUpdateTime()

Microseconds spent in this script's last Update/LateUpdate, returned as a string (may contain comma separators — parse with tonumber((tostring(s):gsub(",","")))). Requires Scene:SetProfileScriptsUpdate(true).

string GetScriptCompileTime()

string GetScriptAttachTime()

Microseconds of this script's last Attach call (string, µs).

string GetScriptStartTime()

Microseconds of this script's last Start call (string, µs).

Properties

boolean active

boolean activeInHierarchy

Object object

Object obj

boolean isDestroyed

string type

boolean onePerObject

ScriptInstance instance

string name

Asset luaFile

string luaFilePath

string file

boolean syncToClients

integer priority

VarTable varsTable