Skip to content
Roblox API Reference

ModuleScript

A script type that runs once when require() is called with it. Returns exactly one value, usually a table of functions, to used by other scripts. Useful for compartmentalizing code.
Memory category
Script
Own members
4
Inherited members
82
Subclasses
0
Siblings
3

Properties34

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Inherited fromLuaSourceContainer7

Property categoryData

Defined byModuleScript4

Property categoryData

  • ModuleScript.Confidential: boolean = false
    • Hidden
    • Not replicated
    • Not scriptable
    • Roblox engine security
  • ModuleScript.Source: string = ""
    The code to be executed.
    • Capabilities: PluginOrOpenCloud
  • ModuleScript.UnrestrictedRequireAllowed: boolean = false
    • Hidden
    • Not scriptable
    • Roblox engine security
  • ModuleScript.LinkedSource: string = ""
    Deprecated: This property is now replaced by packages (opens in a new tab) which has greater functionality.
    Used to store a URL that points to an online script source. Binds the online code to the script's Script.Source.
    • Deprecated
    • Capabilities: LoadUnownedAsset

Methods42

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39

Events10

Inherited fromObject1
Inherited fromInstance9