Open Asterune
Script

Script

Executes Luau on the server.

Creatable
Instance.new("Script")
Inherits
BaseScriptLuaSourceContainerInstance
Replication
Standard

Behavior

Script executes server-side game logic. Supported execution containers include ServerScriptService and workspace. A Script placed in StarterGui or under a player does not execute.

Changes to replicated instances and properties are sent to clients according to their replication rules. The script global references the executing script instance.

Summary

Members4
Properties2
Methods2

Properties

Disabled

Script.Disabled: boolean = false

Whether execution is disabled. Setting this to false starts execution from the beginning.

Source

Script.Source: string = ""

The Luau source text of the script.

Methods

GetExecutionGroup

Script:GetExecutionGroup(): ExecutionGroup?

Returns this instance if it is an ExecutionGroup. Otherwise returns the nearest ancestor ExecutionGroup, or nil when no group contains the instance.

GetScripts

Script:GetScripts(): table

Returns the script instances available through this script binding.

Inherited members

Inherited47

Example

Luau
print(script:GetFullName())

LocalScript · ModuleScript · RunService · script