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
Whether execution is disabled.
The Luau source text of the script.
Returns this instance if it is an ExecutionGroup.
Returns the script instances available through this script binding.
Properties
Disabled
Script.Disabled: boolean = falseWhether 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(): tableReturns the script instances available through this script binding.
Inherited members
- Properties
- ArchivableClassNameNameParent
- Methods
- AddComponent()AddTag()ClearAllChildren()ClearTags()Clone()Destroy()FindFirstAncestor()FindFirstAncestorOfClass()FindFirstAncestorWhichIsA()FindFirstChild()FindFirstChildOfClass()FindFirstChildWhichIsA()FindFirstDescendant()GetAttribute()GetAttributeChangedSignal()GetAttributes()GetChildren()GetComponent()GetComponentChangedSignal()GetComponents()GetDebugId()GetDescendants()GetFullName()GetPropertyChangedSignal()GetReferencing()GetTags()HasComponent()HasTag()IsA()IsAncestorOf()IsDescendantOf()RemoveComponent()RemoveTag()SetAttribute()WaitForChild()
- Events
- AncestryChangedAttributeChangedChangedChildAddedChildRemovedDescendantAddedDescendantRemovingDestroying
Example
print(script:GetFullName())