UNPKG

@rbxts/types

Version:

TypeScript typings for the Roblox platform. Partially handwritten and partially automatically generated.

960 lines (954 loc) 2.44 MB
// THIS FILE IS GENERATED AUTOMATICALLY AND SHOULD NOT BE EDITED BY HAND! /// <reference no-default-lib="true"/> /// <reference path="../roblox.d.ts" /> /// <reference path="enums.d.ts" /> interface Services { AccountService: AccountService; ActivityHistoryService: ActivityHistoryService; AnalyticsService: AnalyticsService; AnimationClipProvider: AnimationClipProvider; AnimationFromVideoCreatorService: AnimationFromVideoCreatorService; AnimationFromVideoCreatorStudioService: AnimationFromVideoCreatorStudioService; AppUpdateService: AppUpdateService; AssetCounterService: AssetCounterService; AssetDeliveryProxy: AssetDeliveryProxy; AssetImportService: AssetImportService; AssetManagerService: AssetManagerService; AssetService: AssetService; AvatarChatService: AvatarChatService; AvatarCreationService: AvatarCreationService; AvatarEditorService: AvatarEditorService; AvatarImportService: AvatarImportService; BadgeService: BadgeService; BulkImportService: BulkImportService; CalloutService: CalloutService; CaptureService: CaptureService; Chat: Chat; ChatbotUIService: ChatbotUIService; CollaboratorsService: CollaboratorsService; CollectionService: CollectionService; CommandService: CommandService; CommerceService: CommerceService; ConfigureServerService: ConfigureServerService; ConnectivityService: ConnectivityService; ContentProvider: ContentProvider; ContextActionService: ContextActionService; ControllerService: ControllerService; ConversationalAIAcceptanceService: ConversationalAIAcceptanceService; CoreScriptDebuggingManagerHelper: CoreScriptDebuggingManagerHelper; CreationDBService: CreationDBService; CrossDMScriptChangeListener: CrossDMScriptChangeListener; DataModelPatchService: DataModelPatchService; DataStoreService: DataStoreService; Debris: Debris; DebuggablePluginWatcher: DebuggablePluginWatcher; DebuggerConnectionManager: DebuggerConnectionManager; DebuggerUIService: DebuggerUIService; DeviceIdService: DeviceIdService; DraggerService: DraggerService; EngineAPICloudProcessingService: EngineAPICloudProcessingService; EventIngestService: EventIngestService; ExampleService: ExampleService; ExperienceAuthService: ExperienceAuthService; ExperienceNotificationService: ExperienceNotificationService; ExperienceService: ExperienceService; ExperienceStateCaptureService: ExperienceStateCaptureService; FaceAnimatorService: FaceAnimatorService; FacialAnimationRecordingService: FacialAnimationRecordingService; FacialAnimationStreamingServiceV2: FacialAnimationStreamingServiceV2; GamepadService: GamepadService; GamePassService: GamePassService; GenericChallengeService: GenericChallengeService; GeometryService: GeometryService; GroupService: GroupService; GuiService: GuiService; HapticService: HapticService; HeightmapImporterService: HeightmapImporterService; HttpService: HttpService; ILegacyStudioBridge: ILegacyStudioBridge; IncrementalPatchBuilder: IncrementalPatchBuilder; InsertService: InsertService; InternalSyncService: InternalSyncService; IXPService: IXPService; JointsService: JointsService; KeyframeSequenceProvider: KeyframeSequenceProvider; LanguageService: LanguageService; LegacyStudioBridge: LegacyStudioBridge; Lighting: Lighting; LiveScriptingService: LiveScriptingService; LocalizationService: LocalizationService; LodDataService: LodDataService; LogReporterService: LogReporterService; LogService: LogService; LSPFileSyncService: LSPFileSyncService; LuauScriptAnalyzerService: LuauScriptAnalyzerService; MarketplaceService: MarketplaceService; MaterialGenerationService: MaterialGenerationService; MaterialService: MaterialService; MemoryStoreService: MemoryStoreService; MessageBusService: MessageBusService; MessagingService: MessagingService; MetaBreakpointManager: MetaBreakpointManager; OmniRecommendationsService: OmniRecommendationsService; OpenCloudService: OpenCloudService; PackageUIService: PackageUIService; PatchBundlerFileWatch: PatchBundlerFileWatch; PathfindingService: PathfindingService; PhysicsService: PhysicsService; PlacesService: PlacesService; PlaceStatsService: PlaceStatsService; PlatformCloudStorageService: PlatformCloudStorageService; PlatformFriendsService: PlatformFriendsService; PlayerHydrationService: PlayerHydrationService; Players: Players; PlayerViewService: PlayerViewService; PluginManagementService: PluginManagementService; PluginPolicyService: PluginPolicyService; PolicyService: PolicyService; ProcessInstancePhysicsService: ProcessInstancePhysicsService; ProjectFolderService: ProjectFolderService; ProximityPromptService: ProximityPromptService; PublishService: PublishService; ReflectionService: ReflectionService; RemoteCursorService: RemoteCursorService; RemoteDebuggerServer: RemoteDebuggerServer; ReplicatedFirst: ReplicatedFirst; ReplicatedStorage: ReplicatedStorage; RibbonNotificationService: RibbonNotificationService; RobloxServerStorage: RobloxServerStorage; RomarkService: RomarkService; RtMessagingService: RtMessagingService; RunService: RunService; SafetyService: SafetyService; ScriptChangeService: ScriptChangeService; ScriptCloneWatcher: ScriptCloneWatcher; ScriptCloneWatcherHelper: ScriptCloneWatcherHelper; ScriptCommitService: ScriptCommitService; ScriptContext: ScriptContext; ScriptEditorService: ScriptEditorService; ScriptProfilerService: ScriptProfilerService; ScriptRegistrationService: ScriptRegistrationService; SelectionHighlightManager: SelectionHighlightManager; ServerScriptService: ServerScriptService; ServerStorage: ServerStorage; ServiceVisibilityService: ServiceVisibilityService; SessionService: SessionService; SharedTableRegistry: SharedTableRegistry; ShorelineUpgraderService: ShorelineUpgraderService; SmoothVoxelsUpgraderService: SmoothVoxelsUpgraderService; SnippetService: SnippetService; SocialService: SocialService; SoundService: SoundService; StarterGui: StarterGui; StarterPack: StarterPack; StarterPlayer: StarterPlayer; StartupMessageService: StartupMessageService; Stats: Stats; StreamingService: StreamingService; StudioAssetService: StudioAssetService; StudioDeviceEmulatorService: StudioDeviceEmulatorService; StudioPublishService: StudioPublishService; StudioScriptDebugEventListener: StudioScriptDebugEventListener; StudioSdkService: StudioSdkService; StudioWidgetsService: StudioWidgetsService; StylingService: StylingService; TeamCreateData: TeamCreateData; TeamCreatePublishService: TeamCreatePublishService; TeamCreateService: TeamCreateService; Teams: Teams; TeleportService: TeleportService; TemporaryCageMeshProvider: TemporaryCageMeshProvider; TemporaryScriptService: TemporaryScriptService; TextBoxService: TextBoxService; TextChatService: TextChatService; TextService: TextService; TextureGenerationService: TextureGenerationService; ToastNotificationService: ToastNotificationService; TracerService: TracerService; TutorialService: TutorialService; TweenService: TweenService; UGCAvatarService: UGCAvatarService; UnvalidatedAssetService: UnvalidatedAssetService; UserInputService: UserInputService; UserService: UserService; VideoCaptureService: VideoCaptureService; VideoService: VideoService; VisibilityCheckDispatcher: VisibilityCheckDispatcher; VisualizationModeService: VisualizationModeService; VoiceChatInternal: VoiceChatInternal; VoiceChatService: VoiceChatService; VRService: VRService; VRStatusService: VRStatusService; Workspace: Workspace; } interface CreatableInstances { Accessory: Accessory; AccessoryDescription: AccessoryDescription; Accoutrement: Accoutrement; Actor: Actor; AdGui: AdGui; AdPortal: AdPortal; AirController: AirController; AlignOrientation: AlignOrientation; AlignPosition: AlignPosition; AngularVelocity: AngularVelocity; Animation: Animation; AnimationConstraint: AnimationConstraint; AnimationController: AnimationController; AnimationRigData: AnimationRigData; Animator: Animator; ArcHandles: ArcHandles; Atmosphere: Atmosphere; Attachment: Attachment; AudioAnalyzer: AudioAnalyzer; AudioChorus: AudioChorus; AudioCompressor: AudioCompressor; AudioDeviceInput: AudioDeviceInput; AudioDeviceOutput: AudioDeviceOutput; AudioDistortion: AudioDistortion; AudioEcho: AudioEcho; AudioEmitter: AudioEmitter; AudioEqualizer: AudioEqualizer; AudioFader: AudioFader; AudioFlanger: AudioFlanger; AudioListener: AudioListener; AudioPitchShifter: AudioPitchShifter; AudioPlayer: AudioPlayer; AudioReverb: AudioReverb; AudioSearchParams: AudioSearchParams; Backpack: Backpack; BallSocketConstraint: BallSocketConstraint; Beam: Beam; BillboardGui: BillboardGui; BindableEvent: BindableEvent; BindableFunction: BindableFunction; BlockMesh: BlockMesh; BloomEffect: BloomEffect; BlurEffect: BlurEffect; BodyAngularVelocity: BodyAngularVelocity; BodyColors: BodyColors; BodyForce: BodyForce; BodyGyro: BodyGyro; BodyPartDescription: BodyPartDescription; BodyPosition: BodyPosition; BodyThrust: BodyThrust; BodyVelocity: BodyVelocity; Bone: Bone; BoolValue: BoolValue; BoxHandleAdornment: BoxHandleAdornment; Breakpoint: Breakpoint; BrickColorValue: BrickColorValue; BubbleChatMessageProperties: BubbleChatMessageProperties; BuoyancySensor: BuoyancySensor; Camera: Camera; CanvasGroup: CanvasGroup; CFrameValue: CFrameValue; CharacterMesh: CharacterMesh; ChorusSoundEffect: ChorusSoundEffect; ClickDetector: ClickDetector; ClimbController: ClimbController; Clouds: Clouds; Color3Value: Color3Value; ColorCorrectionEffect: ColorCorrectionEffect; CompressorSoundEffect: CompressorSoundEffect; ConeHandleAdornment: ConeHandleAdornment; Configuration: Configuration; ControllerManager: ControllerManager; ControllerPartSensor: ControllerPartSensor; CornerWedgePart: CornerWedgePart; CurveAnimation: CurveAnimation; CylinderHandleAdornment: CylinderHandleAdornment; CylinderMesh: CylinderMesh; CylindricalConstraint: CylindricalConstraint; DataStoreGetOptions: DataStoreGetOptions; DataStoreIncrementOptions: DataStoreIncrementOptions; DataStoreOptions: DataStoreOptions; DataStoreSetOptions: DataStoreSetOptions; Decal: Decal; DepthOfFieldEffect: DepthOfFieldEffect; Dialog: Dialog; DialogChoice: DialogChoice; DistortionSoundEffect: DistortionSoundEffect; DoubleConstrainedValue: DoubleConstrainedValue; DragDetector: DragDetector; Dragger: Dragger; EchoSoundEffect: EchoSoundEffect; EditableImage: EditableImage; EditableMesh: EditableMesh; EqualizerSoundEffect: EqualizerSoundEffect; EulerRotationCurve: EulerRotationCurve; ExperienceInviteOptions: ExperienceInviteOptions; Explosion: Explosion; FaceControls: FaceControls; FileMesh: FileMesh; Fire: Fire; FlangeSoundEffect: FlangeSoundEffect; FloatCurve: FloatCurve; FloorWire: FloorWire; Folder: Folder; ForceField: ForceField; Frame: Frame; GetTextBoundsParams: GetTextBoundsParams; Glue: Glue; GroundController: GroundController; Handles: Handles; Hat: Hat; HiddenSurfaceRemovalAsset: HiddenSurfaceRemovalAsset; Highlight: Highlight; HingeConstraint: HingeConstraint; Hole: Hole; Humanoid: Humanoid; HumanoidController: HumanoidController; HumanoidDescription: HumanoidDescription; IKControl: IKControl; ImageButton: ImageButton; ImageHandleAdornment: ImageHandleAdornment; ImageLabel: ImageLabel; IntConstrainedValue: IntConstrainedValue; InternalSyncItem: InternalSyncItem; IntersectOperation: IntersectOperation; IntValue: IntValue; Keyframe: Keyframe; KeyframeMarker: KeyframeMarker; KeyframeSequence: KeyframeSequence; LinearVelocity: LinearVelocity; LineForce: LineForce; LineHandleAdornment: LineHandleAdornment; LocalizationTable: LocalizationTable; LocalScript: LocalScript; ManualGlue: ManualGlue; ManualWeld: ManualWeld; MarkerCurve: MarkerCurve; MaterialVariant: MaterialVariant; MeshPart: MeshPart; Model: Model; ModuleScript: ModuleScript; Motor: Motor; Motor6D: Motor6D; MotorFeature: MotorFeature; NegateOperation: NegateOperation; NoCollisionConstraint: NoCollisionConstraint; Noise: Noise; NumberPose: NumberPose; NumberValue: NumberValue; ObjectValue: ObjectValue; OperationGraph: OperationGraph; Pants: Pants; Part: Part; ParticleEmitter: ParticleEmitter; PartOperation: PartOperation; Path2D: Path2D; PathfindingLink: PathfindingLink; PathfindingModifier: PathfindingModifier; PitchShiftSoundEffect: PitchShiftSoundEffect; Plane: Plane; PlaneConstraint: PlaneConstraint; PluginCapabilities: PluginCapabilities; PointLight: PointLight; Pose: Pose; PrismaticConstraint: PrismaticConstraint; ProximityPrompt: ProximityPrompt; RayValue: RayValue; RemoteEvent: RemoteEvent; RemoteFunction: RemoteFunction; ReverbSoundEffect: ReverbSoundEffect; RigidConstraint: RigidConstraint; RobloxEditableImage: RobloxEditableImage; RobloxEditableMesh: RobloxEditableMesh; RocketPropulsion: RocketPropulsion; RodConstraint: RodConstraint; RopeConstraint: RopeConstraint; Rotate: Rotate; RotateP: RotateP; RotateV: RotateV; RotationCurve: RotationCurve; ScreenGui: ScreenGui; Script: Script; ScrollingFrame: ScrollingFrame; Seat: Seat; SelectionBox: SelectionBox; SelectionPartLasso: SelectionPartLasso; SelectionPointLasso: SelectionPointLasso; SelectionSphere: SelectionSphere; Shirt: Shirt; ShirtGraphic: ShirtGraphic; SkateboardController: SkateboardController; SkateboardPlatform: SkateboardPlatform; Sky: Sky; Smoke: Smoke; Snap: Snap; Sound: Sound; SoundGroup: SoundGroup; Sparkles: Sparkles; SpawnLocation: SpawnLocation; SpecialMesh: SpecialMesh; SphereHandleAdornment: SphereHandleAdornment; SpotLight: SpotLight; SpringConstraint: SpringConstraint; StarterGear: StarterGear; StringValue: StringValue; StudioAttachment: StudioAttachment; StudioCallout: StudioCallout; StyleDerive: StyleDerive; StyleLink: StyleLink; StyleRule: StyleRule; StyleSheet: StyleSheet; SunRaysEffect: SunRaysEffect; SurfaceAppearance: SurfaceAppearance; SurfaceGui: SurfaceGui; SurfaceLight: SurfaceLight; SurfaceSelection: SurfaceSelection; SwimController: SwimController; Team: Team; TeleportOptions: TeleportOptions; TerrainDetail: TerrainDetail; TerrainRegion: TerrainRegion; TextBox: TextBox; TextButton: TextButton; TextChannel: TextChannel; TextChatCommand: TextChatCommand; TextChatMessageProperties: TextChatMessageProperties; TextLabel: TextLabel; Texture: Texture; Tool: Tool; Torque: Torque; TorsionSpringConstraint: TorsionSpringConstraint; TrackerStreamAnimation: TrackerStreamAnimation; Trail: Trail; TremoloSoundEffect: TremoloSoundEffect; TrussPart: TrussPart; UIAspectRatioConstraint: UIAspectRatioConstraint; UICorner: UICorner; UIFlexItem: UIFlexItem; UIGradient: UIGradient; UIGridLayout: UIGridLayout; UIListLayout: UIListLayout; UIPadding: UIPadding; UIPageLayout: UIPageLayout; UIScale: UIScale; UISizeConstraint: UISizeConstraint; UIStroke: UIStroke; UITableLayout: UITableLayout; UITextSizeConstraint: UITextSizeConstraint; UnionOperation: UnionOperation; UniversalConstraint: UniversalConstraint; UnreliableRemoteEvent: UnreliableRemoteEvent; Vector3Curve: Vector3Curve; Vector3Value: Vector3Value; VectorForce: VectorForce; VehicleController: VehicleController; VehicleSeat: VehicleSeat; VelocityMotor: VelocityMotor; VideoDeviceInput: VideoDeviceInput; VideoFrame: VideoFrame; ViewportFrame: ViewportFrame; VisualizationMode: VisualizationMode; VisualizationModeCategory: VisualizationModeCategory; WedgePart: WedgePart; Weld: Weld; WeldConstraint: WeldConstraint; Wire: Wire; WireframeHandleAdornment: WireframeHandleAdornment; WorldModel: WorldModel; WrapLayer: WrapLayer; WrapTarget: WrapTarget; } interface Instances extends Services, CreatableInstances { AnimationClip: AnimationClip; AnimationImportData: AnimationImportData; AnimationStreamTrack: AnimationStreamTrack; AnimationTrack: AnimationTrack; AssetImportSession: AssetImportSession; AssetPatchSettings: AssetPatchSettings; AssetSoundEffect: AssetSoundEffect; AudioPages: AudioPages; Avatar2DGenerationJob: Avatar2DGenerationJob; Avatar3DGenerationJob: Avatar3DGenerationJob; AvatarGenerationJob: AvatarGenerationJob; AvatarGenerationSession: AvatarGenerationSession; BackpackItem: BackpackItem; BanHistoryPages: BanHistoryPages; BaseImportData: BaseImportData; BasePart: BasePart; BasePlayerGui: BasePlayerGui; BaseRemoteEvent: BaseRemoteEvent; BaseScript: BaseScript; BaseWrap: BaseWrap; BevelMesh: BevelMesh; BodyMover: BodyMover; BubbleChatConfiguration: BubbleChatConfiguration; CatalogPages: CatalogPages; ChannelSelectorSoundEffect: ChannelSelectorSoundEffect; CharacterAppearance: CharacterAppearance; ChatInputBarConfiguration: ChatInputBarConfiguration; ChatWindowConfiguration: ChatWindowConfiguration; Clothing: Clothing; CloudLocalizationTable: CloudLocalizationTable; Collaborator: Collaborator; CommandInstance: CommandInstance; Constraint: Constraint; Controller: Controller; ControllerBase: ControllerBase; ControllerSensor: ControllerSensor; CustomSoundEffect: CustomSoundEffect; DataModel: DataModel; DataModelMesh: DataModelMesh; DataStore: DataStore; DataStoreInfo: DataStoreInfo; DataStoreKey: DataStoreKey; DataStoreKeyInfo: DataStoreKeyInfo; DataStoreKeyPages: DataStoreKeyPages; DataStoreListingPages: DataStoreListingPages; DataStoreObjectVersionInfo: DataStoreObjectVersionInfo; DataStorePages: DataStorePages; DataStoreVersionPages: DataStoreVersionPages; DebuggerConnection: DebuggerConnection; DebuggerLuaResponse: DebuggerLuaResponse; DebuggerVariable: DebuggerVariable; DynamicRotate: DynamicRotate; EmotesPages: EmotesPages; FaceInstance: FaceInstance; FacialAnimationStreamingServiceStats: FacialAnimationStreamingServiceStats; FacialAnimationStreamingSubsessionStats: FacialAnimationStreamingSubsessionStats; FacsImportData: FacsImportData; Feature: Feature; FormFactorPart: FormFactorPart; FriendPages: FriendPages; GenericSettings: GenericSettings; GlobalDataStore: GlobalDataStore; GroupImportData: GroupImportData; GuiBase: GuiBase; GuiBase2d: GuiBase2d; GuiBase3d: GuiBase3d; GuiButton: GuiButton; GuiLabel: GuiLabel; GuiObject: GuiObject; HandleAdornment: HandleAdornment; HandlesBase: HandlesBase; InputObject: InputObject; Instance: Instance; InstanceAdornment: InstanceAdornment; InventoryPages: InventoryPages; JointImportData: JointImportData; JointInstance: JointInstance; LayerCollector: LayerCollector; Light: Light; LocalDebuggerConnection: LocalDebuggerConnection; LodDataEntity: LodDataEntity; LuaSourceContainer: LuaSourceContainer; ManualSurfaceJointInstance: ManualSurfaceJointInstance; MaterialGenerationSession: MaterialGenerationSession; MaterialImportData: MaterialImportData; MemoryStoreHashMap: MemoryStoreHashMap; MemoryStoreHashMapPages: MemoryStoreHashMapPages; MemoryStoreQueue: MemoryStoreQueue; MemoryStoreSortedMap: MemoryStoreSortedMap; MeshImportData: MeshImportData; MessageBusConnection: MessageBusConnection; MetaBreakpoint: MetaBreakpoint; MetaBreakpointContext: MetaBreakpointContext; Mouse: Mouse; NetworkMarker: NetworkMarker; OpenCloudApiV1: OpenCloudApiV1; OrderedDataStore: OrderedDataStore; OutfitPages: OutfitPages; PackageLink: PackageLink; Pages: Pages; ParabolaAdornment: ParabolaAdornment; PartAdornment: PartAdornment; PatchMapping: PatchMapping; Path: Path; PausedState: PausedState; PausedStateBreakpoint: PausedStateBreakpoint; PausedStateException: PausedStateException; Platform: Platform; Player: Player; PlayerGui: PlayerGui; PlayerMouse: PlayerMouse; PlayerScripts: PlayerScripts; PluginManagerInterface: PluginManagerInterface; PoseBase: PoseBase; PostEffect: PostEffect; PVAdornment: PVAdornment; PVInstance: PVInstance; RootImportData: RootImportData; ScreenshotHud: ScreenshotHud; ScriptBuilder: ScriptBuilder; ScriptDocument: ScriptDocument; ScriptRuntime: ScriptRuntime; SelectionLasso: SelectionLasso; SensorBase: SensorBase; ServiceProvider: ServiceProvider; SlidingBallConstraint: SlidingBallConstraint; SoundEffect: SoundEffect; StackFrame: StackFrame; StandardPages: StandardPages; StarterCharacterScripts: StarterCharacterScripts; StarterPlayerScripts: StarterPlayerScripts; StudioObjectBase: StudioObjectBase; StudioWidget: StudioWidget; StyleBase: StyleBase; SurfaceGuiBase: SurfaceGuiBase; SyncScriptBuilder: SyncScriptBuilder; TeleportAsyncResult: TeleportAsyncResult; Terrain: Terrain; TextChatConfigurations: TextChatConfigurations; TextChatMessage: TextChatMessage; TextFilterResult: TextFilterResult; TextFilterTranslatedResult: TextFilterTranslatedResult; TextSource: TextSource; TextureGenerationPartGroup: TextureGenerationPartGroup; TextureGenerationUnwrappingRequest: TextureGenerationUnwrappingRequest; ThreadState: ThreadState; TouchTransmitter: TouchTransmitter; TrackerLodController: TrackerLodController; Translator: Translator; TriangleMeshPart: TriangleMeshPart; Tween: Tween; TweenBase: TweenBase; UIBase: UIBase; UIComponent: UIComponent; UIConstraint: UIConstraint; UIGridStyleLayout: UIGridStyleLayout; UILayout: UILayout; UserGameSettings: UserGameSettings; UserSettings: UserSettings; ValueBase: ValueBase; WorldRoot: WorldRoot; } // GENERATED ROBLOX INSTANCE CLASSES /** Instance is the base class for all classes in the Roblox class hierarchy. Every other class that the Roblox engine defines inherits all of the members of Instance. It is not possible to directly create Instance objects. * * Instance has a special function called `Instance.new` which is used to create objects via code. This function takes the name of the class as a parameter and returns the created object. Abstract classes and services cannot be created with the Instance.new function. */ interface Instance { /** * **DO NOT USE!** * * This field exists to force TypeScript to recognize this as a nominal type * @hidden * @deprecated */ readonly _nominal_Instance: unique symbol; /** * This property determines whether an [object](https://developer.roblox.com/en-us/api-reference/class/Instance) should be included when the game is published or saved, or when [Instance:Clone](https://developer.roblox.com/en-us/api-reference/function/Instance/Clone) is called on one of the object's ancestors. Calling Clone directly on an object will return nil if the cloned object is not archivable. Copying an object in Studio (using the 'Duplicate' or 'Copy' options) will ignore the Archivable property and set Archivable to true for the copy. * * local part = Instance.new("Part") * print(part:Clone()) --&gt; Part * part.Archivable = false * print(part:Clone()) --&gt; nil */ Archivable: boolean; /** * A read-only string representing the class this [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) belongs to. * * This property can be used with various other functions of Instance that are used to identify objects by type, such as [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA) or [Instance:FindFirstChildOfClass](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChildOfClass). * * Note this property is read only and cannot be altered by scripts. Developers wishing to change an [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s class will instead have to create a new [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance). * * Unlike [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA), ClassName can be used to check if an object belongs to a specific class ignoring class inheritance. For example: * * for \_, child in ipairs(game.Workspace:GetChildren()) do * if child.ClassName == "Part" then * print("Found a Part") * -- will find Parts in model, but NOT TrussParts, WedgeParts, etc * end * end * * Tags: NotReplicated */ readonly ClassName: string; /** * A non-unique identifier of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance). * * This property is an identifier that describes an object. Names are not necessarily unique identifiers however; multiple children of an object may share the same name. Names are used to keep the object hierarchy organized, along with allowing scripts to access specific objects. * * The name of an object is often used to access the object through the data model hierarchy using the following methods: * * local baseplate = workspace.Baseplate * local baseplate = workspace\["Baseplate"\] * local baseplate = workspace:FindFirstChild("BasePlate") * * In order to make an object accessible using the dot operator, an object's Name must follow a certain syntax. The objects name must start with an underscore or letter. The rest of the name can only contain letters, numbers, or underscores (no other special characters). If an objects name does not follow this syntax it will not be accessible using the dot operator and Lua will not interpret its name as an identifier. * * If more than one object with the same name are siblings then any attempt to index an object by that name will return the only one of the objects found similar to [Instance:FindFirstChild](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChild), but not always the desired object. If a specific object needs to be accessed through code, it is recommended to give it a unique name, or guarantee that none of its siblings share the same name as it. * * Note, a full name showing the instance's hierarchy can be obtained using [Instance:GetFullName](https://developer.roblox.com/en-us/api-reference/function/Instance/GetFullName). */ Name: string; /** * The Parent property determines the hierarchical parent of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance). The following terminology is commonly used when talking about how this property is set: * * * An object is a **child** (**parented to**) another object when its Parent is set to that object. * * The **descendants** of an [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) are the children of that object, plus the descendants of the children as well. * * The **ancestors** of an [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) are all the objects that the Instance is a descendant of. * * It is from this property that many other API members get their name, such as [GetChildren](https://developer.roblox.com/en-us/api-reference/function/Instance/GetChildren) and [FindFirstChild](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChild). * * The [Remove](https://developer.roblox.com/en-us/api-reference/function/Instance/Remove) function sets this property to nil. Calling [Destroy](https://developer.roblox.com/en-us/api-reference/function/Instance/Destroy) will set the Parent of an [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) and all of its descendants to `nil`, and also **lock** the Parent property. An error is raised when setting the Parent of a destroyed object. * * This property is also used to manage whether an object exists in the game or needs be be removed. As long as an objects parent is in the [DataModel](https://developer.roblox.com/en-us/api-reference/class/DataModel), is stored in a variable, or is referenced by another objects property, then the object remains in the game. Otherwise, the object will automatically be removed. The top level [DataModel](https://developer.roblox.com/en-us/api-reference/class/DataModel) object (the one referred to as the `game` by scripts) has no parent, but always has a reference held to it by the game engine, and exists for the duration of a session. * * Newly created objects using `Instance.new` will not have a parent, and usually will not be visible or function until one is set. The most elementary creation of an object has two steps: creating the object, then setting its parent. * * \-- Create a part and parent it to the workspace * local part = Instance.new("Part") * part.Parent = workspace * -- Instance new can also take Parent as a second parameter * Instance.new("NumberValue", workspace) * * Object Replication * ================== * * An object created by server will not replicate to clients until it is parented to some object that is replicated. When creating an object then setting many properties, it's recommended to **set Parent last**. This ensures the object replicates once, instead of replicating many property changes. * * local part = Instance.new("Part") -- Avoid using the second parameter here * part.Anchored = true * part.BrickColor = BrickColor.new("Really red") * -- Potentially many other property changes could go here here... * -- Always set parent last! * part.Parent = workspace * * However, if you were parenting your parts to a [Model](https://developer.roblox.com/en-us/api-reference/class/Model) whose parent hasn't been set yet, then setting the parent first would not matter as the model would not have replicated yet. * * Tags: NotReplicated */ Parent: Instance | undefined; AddTag(this: Instance, tag: string): void; /** * This function destroys all of an [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s children. * * As [Instance:Destroy](https://developer.roblox.com/en-us/api-reference/function/Instance/Destroy) also calls itself on the children of an object it is used on, this function will destroy all descendants. * * Alternatives to ClearAllChildren * -------------------------------- * * If the developer does not wish to destroy all descendants, they should use [Instance:GetChildren](https://developer.roblox.com/en-us/api-reference/function/Instance/GetChildren) or [Instance:GetDescendants](https://developer.roblox.com/en-us/api-reference/function/Instance/GetDescendants) to loop through an object and select what to destroy. For example, the following code sample will destroy all parts in an object. * * for \_, instance in pairs(object:GetDescendants()) do * if instance:IsA("BasePart") then * instance:Destroy() * end * end */ ClearAllChildren(this: Instance): void; /** * **Clone** creates a copy of an object and all of its descendants, ignoring all objects that are not [Archivable](https://developer.roblox.com/en-us/api-reference/property/Instance/Archivable). The copy of the root object is returned by this function and its [Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) is set to nil. * * If a reference property such as [ObjectValue.Value](https://developer.roblox.com/en-us/api-reference/property/ObjectValue/Value) is set in a cloned object, the value of the copy's property depends on original's value: * * * If a reference property refers to an object that was **also** cloned, an _internal reference_, the copy will refer to the copy. * * If a reference property refers to an object that was **not** cloned, an _external reference_, the same value is maintained in the copy. * * This function is typically used to create models that can be regenerated. First, get a reference to the original object. Then, make a copy of the object and insert the copy by setting its [Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) to the [Workspace](https://developer.roblox.com/en-us/api-reference/class/Workspace) or one of its descendants. Finally, when it's time to regenerate the model, [Destroy](https://developer.roblox.com/en-us/api-reference/function/Instance/Destroy) the copy and clone a new one from the original like before. */ Clone<T extends Instance>(this: T): T; /** * Sets the [Instance.Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) property to nil, locks the [Instance.Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) property, disconnects all connections, and calls Destroy on all children. This function is the correct way to dispose of objects that are no longer required. Disposing of unneeded objects is important, since unnecessary objects and connections in a place use up memory (this is called a **memory leak**) which can lead to serious performance issues over time. * * **Tip:** After calling Destroy on an object, set any variables referencing the object (or its descendants) to nil. This prevents your code from accessing anything to do with the object. * * local part = Instance.new("Part") * part.Name = "Hello, world" * part:Destroy() * -- Don't do this: * print(part.Name) --> "Hello, world" * -- Do this to prevent the above line from working: * part = nil * * Once an [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) has been destroyed by this method it cannot be reused because the [Instance.Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) property is locked. To temporarily remove an object, set [Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) it to nil instead. For example: * * object.Parent = nil * wait(2) * object.Parent = workspace * * To Destroy an object after a set amount of time, use [Debris:AddItem](https://developer.roblox.com/en-us/api-reference/function/Debris/AddItem). */ Destroy(this: Instance): void; /** * Returns the first ancestor of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) whose [Instance.Name](https://developer.roblox.com/en-us/api-reference/property/Instance/Name) is equal to the given name. * * This function works upwards, meaning it starts at the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s immediate [Instance.Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) and works up towards the [DataModel](https://developer.roblox.com/en-us/api-reference/class/DataModel). If no matching ancestor is found, it returns nil. * * The following code snippet would find the first ancestor of the object named 'Car'. * * local car = object:FindFirstAncestor("Car") * * For variants of this function that find ancestors of a specific class, please see [Instance:FindFirstAncestorOfClass](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestorOfClass) and [Instance:FindFirstAncestorWhichIsA](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestorWhichIsA). */ FindFirstAncestor(this: Instance, name: string): Instance | undefined; /** * Returns the first ancestor of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) whose [Instance.ClassName](https://developer.roblox.com/en-us/api-reference/property/Instance/ClassName) is equal to the given className. * * This function works upwards, meaning it starts at the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s immediate [Instance.Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) and works up towards the [DataModel](https://developer.roblox.com/en-us/api-reference/class/DataModel). If no matching ancestor is found, it returns nil. * * A common use of this function is finding the [Model](https://developer.roblox.com/en-us/api-reference/class/Model) a [BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart) belongs to. For example: * * local model = part:FindFirstAncestorOfClass("Model") * * This function is a variant of [Instance:FindFirstAncestor](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestor) which checks the [Instance.ClassName](https://developer.roblox.com/en-us/api-reference/property/Instance/ClassName) property rather than [Instance.Name](https://developer.roblox.com/en-us/api-reference/property/Instance/Name). [Instance:FindFirstAncestorWhichIsA](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestorWhichIsA) also exists, using the [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA) method instead to respect class inheritance. */ FindFirstAncestorOfClass<T extends keyof Instances>(this: Instance, className: T): Instances[T] | undefined; /** * Returns the first ancestor of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) for whom [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA) returns true for the given className. * * This function works upwards, meaning it starts at the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s immediate [Instance.Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent) and works up towards the [DataModel](https://developer.roblox.com/en-us/api-reference/class/DataModel). If no matching ancestor is found, it returns nil. * * Unlike [Instance:FindFirstAncestorOfClass](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestorOfClass), this function uses [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA) which respects class inheritance. For example: * * print(part:IsA("Part")) --&gt; true * print(part:IsA("BasePart")) --&gt; true * print(part:IsA("Instance")) --&gt; true * * Therefore, the following code sample will return the first [BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart) ancestor, regardless of if it is a [WedgePart](https://developer.roblox.com/en-us/api-reference/class/WedgePart), [MeshPart](https://developer.roblox.com/en-us/api-reference/class/MeshPart) or [Part](https://developer.roblox.com/en-us/api-reference/class/Part). * * local part = object:FindFirstAncestorWhichIsA("BasePart") * * See also, [Instance:FindFirstAncestor](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstAncestor). */ FindFirstAncestorWhichIsA<T extends keyof Instances>(this: Instance, className: T): Instances[T] | undefined; /** * Returns the first child of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) found with the given name. If no child exists with the given name, this function returns nil. If the optional recursive argument is true, this function searches all descendants rather than only the immediate children of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance). Use this function if your code cannot guarantee the existence of an object with a given name. * * Checking the Existence of An Object * ----------------------------------- * * FindFirstChild is necessary if you need to verify an object something exists before continuing. Attempting to index a child by name using the dot operator throws an error if the child doesn't exist. * * \-- The following line errors if Part doesn't exist in the Workspace: * workspace.Part.Transparency = 0.5 * * Use FindFirstChild to first check for Part, then use an if-statement to run code that needs it. * * local part = workspace:FindFirstChild("Part") * if part then * part.Transparency = 0.5 * end * * Finding a Child Whose Name Matches a Property * --------------------------------------------- * * Sometimes the [Name](https://developer.roblox.com/en-us/api-reference/property/Instance/Name) of an object is the same as that of a property of its [Parent](https://developer.roblox.com/en-us/api-reference/property/Instance/Parent). When using the dot operator, properties take precedence over children if they share a name. * * In the following example, a [Folder](https://developer.roblox.com/en-us/api-reference/class/Folder) called “Color” is added to a [Part](https://developer.roblox.com/en-us/api-reference/class/Part), which also has the `Part/Color` property. `Part.Color` refers to the [Color3](https://developer.roblox.com/en-us/api-reference/datatype/Color3), not the Folder. * * local part = Instance.new("Part") * local folder = Instance.new("Folder") * folder.Name = "Color" * folder.Parent = part * local c = part.Color --> A Color3 * local c2 = part:FindFirstChild("Color") --> The Folder * * A benefit of using FindFirstChild in this way is that the introduction of new properties does not impose a risk on your code. * * **Tip:** If you only need to use the result of a FindFirstChild call once, such as getting the property of a child if it exists, you can use the following syntax with the `and` operator: * * local myColor = workspace:FindFirstChild("SomePart") and workspace.SomePart.Color * * If SomePart exists, `myColor` will contain the Color of SomePart. Otherwise, it'll be nil without throwing an error. This works due to short-circuiting: Lua ignores the right side if the left is nil/false * * Performance Note * ---------------- * * FindFirstChild takes about 20% longer than using dot operator, and almost 8 times longer than simply storing a reference to an object. Therefore, you should avoid calling FindFirstChild in performance dependent code, such as in tight loops or functions connected to [RunService.Heartbeat](https://developer.roblox.com/en-us/api-reference/event/RunService/Heartbeat)/[RunService.RenderStepped](https://developer.roblox.com/en-us/api-reference/event/RunService/RenderStepped). **Store the result in a variable,** or consider using [ChildAdded](https://developer.roblox.com/en-us/api-reference/event/Instance/ChildAdded) or [WaitForChild](https://developer.roblox.com/en-us/api-reference/function/Instance/WaitForChild) to detect when a child of a given name becomes available. */ FindFirstChild(this: Instance, childName: string | number, recursive?: boolean): Instance | undefined; /** * Returns the first child of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) whose [ClassName](https://developer.roblox.com/en-us/api-reference/property/Instance/ClassName) is equal to the given className. * * If no matching child is found, this function returns nil. * * Unlike [Instance:FindFirstChildWhichIsA](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChildWhichIsA) this function uses only returns objects whose class matches the given className, ignoring class inheritance. * * Developers looking for a child by name should use [Instance:FindFirstChild](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChild) instead. */ FindFirstChildOfClass<T extends keyof Instances>(this: Instance, className: T): Instances[T] | undefined; /** * Returns the first child of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance) for whom [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA) returns true for the given className. * * If no matching child is found, this function returns nil. If the optional recursive argument is true, this function searches all descendants rather than only the immediate children of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance). * * Unlike [Instance:FindFirstChildOfClass](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChildOfClass), this function uses [Instance:IsA](https://developer.roblox.com/en-us/api-reference/function/Instance/IsA) which respects class inheritance. For example: * * print(part:IsA("Part")) --> true * print(part:IsA("BasePart")) --> true * print(part:IsA("Instance")) --> true * * Therefore, the following code sample will return the first [BasePart](https://developer.roblox.com/en-us/api-reference/class/BasePart) child, regardless of if it is a [WedgePart](https://developer.roblox.com/en-us/api-reference/class/WedgePart), [MeshPart](https://developer.roblox.com/en-us/api-reference/class/MeshPart) or [Part](https://developer.roblox.com/en-us/api-reference/class/Part). * * local part = object:FindFirstChildWhichIsA("BasePart") * * Developers looking for a child by name, should use [Instance:FindFirstChild](https://developer.roblox.com/en-us/api-reference/function/Instance/FindFirstChild) instead. */ FindFirstChildWhichIsA<T extends keyof Instances>( this: Instance, className: T, recursive?: boolean, ): Instances[T] | undefined; /** * Returns the first descendant found with the given [Instance.Name](https://developer.roblox.com/en-us/api-reference/property/Instance/Name). */ FindFirstDescendant(this: Instance, name: string): Instance | undefined; /** * Returns the Actor associated with the Instance, usually the first Actor ancestor */ GetActor(this: Instance): Actor | undefined; /** * This function returns the attribute which has been assigned to the given name. If no attribute has been assigned then nil is returned. * * For example, the following code snippet will set the value of the instance's `InitialPostion` attribute. Note that this code sample does not define [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance): * * local initialPosition = instance:GetAttribute("InitialPosition") * * See also * ======== * * * [Instance:SetAttribute](https://developer.roblox.com/en-us/api-reference/function/Instance/SetAttribute), sets the attribute with the given name to the given value * * [Instance:GetAttributes](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributes), returns a dictionary of string → variant pairs for each of the instance's attributes * * [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged), fires whenever an attribute is changed on the instance * * [Instance:GetAttributeChangedSignal](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributeChangedSignal), returns an event that fires when the given attribute changes */ GetAttribute(this: Instance, attribute: string): AttributeValue | undefined; /** * This function returns an event that behaves exactly like the `Changed` event, except that the event only fires when the given attribute changes. It's generally a good idea to use this method instead of a connection to Changed with a function that checks the attribute name. Subsequent calls to this method on the same object with the same attribute name return the same event. * * It is similar to [Instance:GetPropertyChangedSignal](https://developer.roblox.com/en-us/api-reference/function/Instance/GetPropertyChangedSignal) but for attributes. * * For example, the following code snippet will return a signal that fires the function [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged) when the instance's `InitialPosition` attribute changes. Note that this code sample does not define [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance): * * local function attributeChanged() * print(“Attribute changed”) * end * * instance:GetAttributeChangedSignal("InitialPosition"):Connect(attributeChanged) * * See also * ======== * * * [Instance:SetAttribute](https://developer.roblox.com/en-us/api-reference/function/Instance/SetAttribute), sets the attribute with the given name to the given value * * [Instance:GetAttribute](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttribute), returns the attribute which has been assigned to the given name * * [Instance:GetAttributes](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributes), returns a dictionary of string → variant pairs for each of the instance's attributes * * [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged), fires whenever an attribute is changed on the instance */ GetAttributeChangedSignal(this: Instance, attribute: string): RBXScriptSignal; /** * This function returns a dictionary of string → variant pairs for each attribute where the string is the name of the attribute and the variant is a non-nil value. * * For example, the following code snippet will print an instance's attributes and values. Note that this code sample does not define [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance): * * local attributes = instance:GetAttributes() * for name, value in pairs(attributes) do * print(name .. “ “ .. value) * end * * See also * ======== * * * [Instance:SetAttribute](https://developer.roblox.com/en-us/api-reference/function/Instance/SetAttribute), sets the attribute with the given name to the given value * * [Instance:GetAttribute](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttribute), returns the attribute which has been assigned to the given name * * [Instance.AttributeChanged](https://developer.roblox.com/en-us/api-reference/event/Instance/AttributeChanged), fires whenever an attribute is changed on the instance * * [Instance:GetAttributeChangedSignal](https://developer.roblox.com/en-us/api-reference/function/Instance/GetAttributeChangedSignal), returns an event that fires when the given attribute changes */ GetAttributes(this: Instance): Map<string, AttributeValue>; /** * Returns an array (a numerically indexed table) containing all of the [Instance](https://developer.roblox.com/en-us/api-reference/class/Instance)'s direct children, or every [Instance](https: