Open Asterune
script

script

References the executing script instance.

See Script for the associated instance class.

Behavior

script references the script instance currently executing. Use script.Parent to access its parent without an absolute hierarchy path.

See Script for server script members.

Fields

ClassName · Name · Parent

ClassName

The class name of the currently executing script.

Name

The name of the currently executing script.

Parent

The parent of the currently executing script, or nil when it is unparented.

Example

Luau
local parent = script.Parent