BaseScript
Abstract parent of the script classes.
BaseScript is the shared parent of Script and LocalScript. It adds no members of its own and can't be created.
Getting started
local scriptObject = Instance.new("Script")
print(scriptObject:IsA("BaseScript")) -- trueMembers
None. Script adds Source, Enabled, Disabled, and RunContext; LocalScript adds the source and enabled properties relevant to client execution.
Notes
BaseScriptisn't creatable withInstance.new().- Use it for
IsA()checks that should accept either script type. ModuleScriptdoes not descend fromBaseScript; it isn't executed in place.- Cloning a concrete script copies its source and enabled state.
See also
Scriptfor server or general execution.LocalScriptfor client execution.ModuleScriptfor required modules.
