Class reference: Difference between revisions

m
no edit summary
>NXTBoy
(Reverted some subst:s. May have to undo. Removed a column for testing purposes)
mNo edit summary
 
(48 intermediate revisions by 8 users not shown)
Line 1: Line 1:
__NOTOC__
{{CatUp|Lua Help}}
{{CatUp|Lua Help}}


The following is documentation for specific ROBLOX Lua classes. Documentation is currently incomplete and subject to change.
The Legacy Roblox Wiki features an API Reference that documents all of the classes, data types, enumerations, functions, events, callbacks, and properties that can be used to create games on classic Roblox.


If you are looking for information on undocumented classes, one of your best resources is the [[Object Browser]] pane (under the Help menu in [[Roblox Studio]]).
* This page, the Class Reference, documents classes. Classes are core objects and services in Roblox's engine. Classes contain properties, methods, events and callbacks.
* [[Data_Types|Data Types]] are types unique to the Roblox engine, They can contain constructors, properties, and methods.
* [[:Category:Enums|Enums]] are groups of constants that define preset values that you can use with other APIs. Documentation for the generic Enumeration data type is [[Enumeration|here.]]
* [[Function_Dump|Globals]] are functions or properties that you can use in any script. Most globals are native to the Lua programming language while some are exclusive to Roblox's implementation.


==Classes [RBX.lua.]==
If you are looking for more information on undocumented API features, one of your best resources is the Object Browser pane (under the Help menu in Roblox Studio). There are also <b>so many</b> more objects used internally by the game engine which has not yet been added to the list here. If it has documentation on the wiki, it can be found at the [[:Category:ROBLOX_Lua_Objects]] category.
All Game objects are based on [[RBX.lua.Instance (Object)|Instance]] and have the "global" methods, properties, and events defined there. Additionally, some classes derive from others, in a hierarchical tree-like structure, the [[Object Hierarchy]].


==Objects==
=Parts=
:''see also: [[Template:ClassReference]]''
 
<!--
As the essential building blocks of Roblox, these objects interact with each other physically. All classes here inherit from the BasePart abstract class.There parts all all rendered in 3D if placed in workspace.
 
* {{ClassRefItem|Part}}
* {{ClassRefItem|CornerWedgePart}}
* {{ClassRefItem|SkateboardPlatform}}
* {{ClassRefItem|TrussPart}}
* {{ClassRefItem|FlagStand}}
* {{ClassRefItem|Platform}}
* {{ClassRefItem|Seat}}
* {{ClassRefItem|VehicleSeat}}
* {{ClassRefItem|SkateboardPlatform|late=true}}
* [[File:Spawnlocation icon.png]][[RBX.lua.SpawnLocation_(Object)|SpawnLocation]]
* {{ClassRefItem|Terrain|late=true}}
 
=Part modifiers=
 
These objects, when parented to a part, will change the appearance or behavior of the part.
 
* {{ClassRefItem|BlockMesh}}
* {{ClassRefItem|ClickDetector}}
* {{ClassRefItem|CylinderMesh}}
* {{ClassRefItem|Decal}}
* {{ClassRefItem|FileMesh}}
* {{ClassRefItem|Fire}}
* {{ClassRefItem|Hole}}
* {{ClassRefItem|Smoke}}
* {{ClassRefItem|Sparkles}}
* {{ClassRefItem|SpecialMesh}}
* {{ClassRefItem|Texture}}
=Body movers=
 
Similar to part modifiers, these objects work on the part they are parented to. These objects alter the position, orientation, or movement of a part. All classes here inherit from the BodyMover abstract class.
 
* {{ClassRefItem|BodyAngularVelocity}}
* {{ClassRefItem|BodyForce}}
* {{ClassRefItem|BodyGyro}}
* {{ClassRefItem|BodyPosition}}
* {{ClassRefItem|BodyThrust}}
* {{ClassRefItem|BodyVelocity}}
* {{ClassRefItem|RocketPropulsion}}
=Gameplay=
 
These objects are used in general gameplay of a place.
 
* {{ClassRefItem|Camera}}
* {{ClassRefItem|Controller|early=true}}
* {{ClassRefItem|Dialog|late=true}}
* {{ClassRefItem|DialogChoice|late=true}}
* {{ClassRefItem|Explosion}}
* {{ClassRefItem|Flag}}
* {{ClassRefItem|Hint}}
* {{ClassRefItem|HopperBin}}
* {{ClassRefItem|Message}}
* {{ClassRefItem|Player}}
* {{ClassRefItem|Sky}}
* {{ClassRefItem|Sound}}
* {{ClassRefItem|StockSound}}
* {{ClassRefItem|Tool}}
=Humanoids=
 
These objects are usually found in Humanoids. An example is a Player's Character.
 
* {{ClassRefItem|Humanoid}}
* {{ClassRefItem|Accoutrement}}
* {{ClassRefItem|Animation}}
* {{ClassRefItem|AnimationTrack}}
* {{ClassRefItem|BodyColors}}
* {{ClassRefItem|ForceField}}
* {{ClassRefItem|Hat}}
* {{ClassRefItem|Keyframe}}
* {{ClassRefItem|Pants}}
* {{ClassRefItem|Pose}}
* {{ClassRefItem|Shirt}}
* {{ClassRefItem|ShirtGraphic}}
* {{ClassRefItem|Skin}}
=GUI=
 
These objects display graphical elements in 2-dimensional space on the player's screen, in front of the 3D world.
 
* {{ClassRefItem|ScreenGui}}
* {{ClassRefItem|Frame}}
* {{ClassRefItem|ImageButton}}
* {{ClassRefItem|ImageLabel}}
* {{ClassRefItem|NotificationBox}}
* {{ClassRefItem|TextBox}}
* {{ClassRefItem|TextButton}}
* {{ClassRefItem|TextLabel}}
* {{ClassRefItem|GuiMain}}
=3D GUI=
 
These objects display graphical elements in 3-dimensional space. While they don't interact physically with parts, they are usually attached to parts in some way.
 
* {{ClassRefItem|ArcHandles}}
* {{ClassRefItem|BillboardGui}}
* {{ClassRefItem|Handles}}
* {{ClassRefItem|SelectionBox}}
* {{ClassRefItem|SelectionPartLasso}}
* {{ClassRefItem|SelectionPointLasso}}
* {{ClassRefItem|SurfaceSelection}}
=Scripting=
 
These objects are involved in adding scripted functionality to a game.
 
* {{ClassRefItem|Script}}
* {{ClassRefItem|LocalScript}}
* {{ClassRefItem|BindableEvent|late=true}}
* {{ClassRefItem|BindableFunction|late=true}}
* {{ClassRefItem|Plugin|late=true}}
* {{ClassRefItem|PluginManager|late=true}}
* {{ClassRefItem|PluginMouse|late=true}}
=Values=


NOTE: Do NOT edit this page. Instead, edit the Template page, which will soon autogenerate this
These objects exist to hold specific value types. They are essential for communicating data between Scripts.


-->
* {{ClassRefItem|BoolValue}}
{| cellspacing=5 border=0 width=100% style="vertical-align:top;"
* {{ClassRefItem|BrickColorValue}}
|style="width:50%; vertical-align:top"|<!--This splits the page into two separate tables right down the middle. This lets the page be built into two columns of items rather than one huge list on the left side. Looks better and is a better use of space.-->
* {{ClassRefItem|Color3Value}}
{{Object|Animation}}
* {{ClassRefItem|CFrameValue}}
{{Object|AnimationTrack}}
* {{ClassRefItem|NumberValue}}
{{Object|ArcHandles}}
* {{ClassRefItem|ObjectValue}}
{{Object|Backpack}}
* {{ClassRefItem|RayValue}}
{{Object|BillboardGui}}
* {{ClassRefItem|StringValue}}
{{Object|BlockMesh}}
* {{ClassRefItem|Vector3Value}}
{{:Object:BodyAngularVelocity}}
=Joints=
{{:Object:BodyColors}}
{{:Object:BodyForce}}
{{:Object:BodyGyro}}
{{:Object:BodyPosition}}
{{:Object:BodyThrust}}
{{:Object:BodyVelocity}}
{{:Object:BoolValue}}
{{:Object:BrickColorValue}}
{{Object|Camera}}
{{:Object:CFrameValue}}
{{:Object:ClickDetector}}
{{Object|Clothing}}
{{:Object:Color3Value}}
{{Object|CornerWedgePart}}
{{:Object:Configuration}}
{{Object|CylinderMesh}}
{{Object|Decal}}
{{Object|DynamicRotate}}
{{:Object:Explosion}}
{{:Object:Fire}}
{{Object|FileMesh}}
{{Object|Flag}}
{{Object|FlagStand}}
{{:Object:ForceField}}
{{Object|Frame}}
{{Object|Glue}}
{{Object|Handles}}
{{Object|Hat}}
{{Object|Hint}}
{{Object|Hole}}
{{:Object:HopperBin}}
{{Object|Humanoid}}
{{Object|ImageButton}}
{{Object|ImageLabel}}
{{:Object:IntValue}}
{{:Object:Keyframe}}
{{Object|LocalScript}}
{{Object|Message}}
{{Object|Model}}
{{Object|Motor}}
{{Object|MotorFeature}}
{{:Object:Mouse}}
{{Object|NetworkClient}}
{{:Object:NumberValue}}


|style="width:50%; vertical-align:top"|<!-- Start of second column --->
These objects bind parts together, sometimes with an extra effect such as a hinge or motor. All classes here inherit from the JointInstance abstract class.
<!--{{:Object:ObjectValue}}
{{Object|Pants}}
{{Object|ParallelRampPart}}
{{Object|Part}}
{{:Object:Player}}
{{:Object:Pose}}
{{Object|PrismPart}}
{{:Object:ProfilingItem}}
{{Object|PyramidPart}}
{{:Object:RayValue}}
{{Object|RightAngleRampPart}}
{{:Object:RocketPropulsion}}
{{Object|Rotate}}
{{Object|RotateP}}
{{Object|RotateV}}
{{Object|ScreenGui}}
{{Object|Script}}
{{:Object:ScriptContext}}
{{Object|Seat}}
{{Object|SelectionBox}}
{{Object|SelectionPartLasso}}
{{Object|SelectionPointLasso}}
{{Object|Shirt}}
{{:Object:ShirtGraphic}}
{{:Object:SkateboardPlatform}}
{{:Object:Skin}}
{{:Object:Sky}}
{{:Object:Smoke}}
{{Object|Snap}}
{{:Object:Sound}}
{{:Object:Sparkles}}
{{Object|SpawnLocation}}
{{Object|SpecialMesh}}
{{:Object:StarterGear}}
{{:Object:StarterGui}}
{{:Object:StatsItem}}
{{:Object:StringValue}}
{{Object|SurfaceSelection}}
{{Object|Team}}
{{Object|TextBox}}
{{Object|TextButton}}
{{Object|TextLabel}}
{{Object|Texture}}
{{Object|Tool}}
{{:Object:TouchTransmitter}}
{{Object|TrussPart}}
{{:Object:Vector3Value}}
{{Object|VehicleSeat}}
{{:Object:VelocityMotor}}
{{Object|WedgePart}}
{{Object|Weld}}-->


|}<!--End of Objects table --->
* {{ClassRefItem|Glue}}
* {{ClassRefItem|Motor}}
* {{ClassRefItem|MotorFeature}}
* {{ClassRefItem|Motor6D}}
* {{ClassRefItem|Rotate}}
* {{ClassRefItem|RotateP}}
* {{ClassRefItem|RotateV}}
* {{ClassRefItem|Snap}}
* {{ClassRefItem|VelocityMotor}}
* {{ClassRefItem|Weld}}
=Containers=


==Services==
These objects are designed to contain other objects as children. For example, the Workspace holds objects that are simulated as the game runs.
{| cellspacing=5 border=0 width=100% style="vertical-align:top;"
|style="width:50%; vertical-align:top"|<!-- Start of first column -->


{{:Service:BadgeService}}
* {{ClassRefItem|Backpack}}
{{:Service:ChangeHistoryService}}
* {{ClassRefItem|Configuration}}
{{:Service:Debris}}
* {{ClassRefItem|DataModel}}
{{:Service:InsertService}}
* {{ClassRefItem|PlayerGui}}
{{:Service:Lighting}}
* {{ClassRefItem|StarterGear}}
{{:Service:StarterPack}}
* {{ClassRefItem|StarterGui}}
* {{ClassRefItem|Teams}}
=Services=


|style="width:50%; vertical-align:top"|<!-- Start of second column -->
These objects generally operate in the background, and may be helpful with place development. They're unique in that they may only have one instance of themselves, and can be acquired with the GetService method.


{{:Service:PlayerGui}}
* {{ClassRefItem|BadgeService}}
{{:Service:Players}}
* {{ClassRefItem|Debris}}
{{:Service:Selection}}
* {{ClassRefItem|HtmlService|early=true}}
{{:Service:Teams}}
* {{ClassRefItem|InsertService}}
{{:Service:Workspace}}
* {{ClassRefItem|Lighting}}
* {{ClassRefItem|StarterPack}}
* {{ClassRefItem|Players}}
* {{ClassRefItem|ScriptContext}}
* {{ClassRefItem|SoundService}}
* {{ClassRefItem|Teams}}
* {{ClassRefItem|TeleportService|late=true}}
* {{ClassRefItem|Timer}}
* {{ClassRefItem|Workspace}}
=Internal=


|}<!-- End of services table -->
These objects are used internally by the game engine. Generally, trying to use them in Scripts or LocalScripts will result in an error. However, [[Plugin|Plugins]] and the Command Bar in Studio may use them. They might come in handy for making [[How_To_Make_Plugins|Plugins]] to enhance your Studio workflow.


==Structural Classes==
==Structural Classes==
{| cellspacing=5 border=0 width=100% style="vertical-align:top;"
[[Structural_Class|Structural Classes]], or "superclasses", are objects which can't be created or used with Instance.new in game, but are the basis for other objects to inherit properties, events, and methods. For example, {{ClassRefItem|Part}}, {{ClassRefItem|TrussPart}}, and {{ClassRefItem|WedgePart}}, all inherit from the structural class {{ClassRefItem|BasePart}}.
|style="width:50%; vertical-align:top"|<!-- Start of first column -->


{{Object|Accoutrement}}
Essentially, they're used for creating objects that are mostly similar, but slightly diverge, such as a Part and TrussPart. They both require the same properties and methods but their physical appearance and functionality diverge.
{{Object|BackpackItem}}
 
{{Object|BasePart}}
* {{ClassRefItem|Instance}}
{{Object|Feature}}
* {{ClassRefItem|Accoutrement}}
|style="width:50%; vertical-align:top"|
* {{ClassRefItem|BackpackItem}}
{{Object|Instance}}
* {{ClassRefItem|BasePart}}
{{Object|JointInstance}}
* {{ClassRefItem|BasePlayerGui}}
{{Object|Platform}}
* {{ClassRefItem|Clothing}}
* {{ClassRefItem|ControllerService|early=true}}
* {{ClassRefItem|Feature}}
* {{ClassRefItem|FormFactorPart}}
* {{ClassRefItem|GuiBase}}
* {{ClassRefItem|GuiButton}}
* {{ClassRefItem|GuiLabel}}
* {{ClassRefItem|GuiObject}}
* {{ClassRefItem|JointInstance}}
* {{ClassRefItem|NetworkPeer}}
* {{ClassRefItem|PVAdornment}}
* {{ClassRefItem|PVInstance}}
* {{ClassRefItem|ReflectionMetadataItem}}
* {{ClassRefItem|ROOT}}
* {{ClassRefItem|StatsItem}}
==Objects==
 
* {{ClassRefItem|AnimationTrackState}}
* {{ClassRefItem|AutoJoint}}
* {{ClassRefItem|HumanoidController}}
* {{ClassRefItem|LocalBackpack}}
* {{ClassRefItem|LocalBackpackItem}}
* {{ClassRefItem|Mouse}}
* {{ClassRefItem|NetworkClient}}
* {{ClassRefItem|NetworkMarker}}
* {{ClassRefItem|NetworkReplicator}}
* {{ClassRefItem|NetworkServer}}
* {{ClassRefItem|NetworkSettings}}
* {{ClassRefItem|PrismPart}}
* {{ClassRefItem|PyramidPart}}
* {{ClassRefItem|RightAngleRampPart}}
* {{ClassRefItem|ReflectionMetadataMember}}
* {{ClassRefItem|RunningAverageItemDouble}}
* {{ClassRefItem|Stats}}
* {{ClassRefItem|TextureTrail}}
* {{ClassRefItem|TouchTransmitter}}
* {{ClassRefItem|VirtualUser}}
==Services==


|}<!-- End of structures table -->
* {{ClassRefItem|ChangeHistoryService}}
* {{ClassRefItem|CollectionService}}
* {{ClassRefItem|ContentProvider}}
* {{ClassRefItem|CoreGui}}
* {{ClassRefItem|FlagStandService}}
* {{ClassRefItem|FriendService}}
* {{ClassRefItem|Geometry}}
* {{ClassRefItem|GuidRegistryService}}
* {{ClassRefItem|GuiService}}
* {{ClassRefItem|KeyframeSequenceProvider}}
* {{ClassRefItem|MeshService}}
* {{ClassRefItem|PhysicsService}}
* {{ClassRefItem|RenderHooksService}}
* {{ClassRefItem|RunService}}
* {{ClassRefItem|Selection}}
* {{ClassRefItem|SocialService}}
* {{ClassRefItem|SpawnerService}}
* {{ClassRefItem|TestService}}
* {{ClassRefItem|TextService}}
* {{ClassRefItem|TextureContentProvider}}
* {{ClassRefItem|TweenService}}
==Studio==
Some classes are used directly by Studio, but others can be used by Studio plugins to analyze properties of the game engine, hardware, and more.


{{:Classes}}
* {{ClassRefItem|DebugSettings}}
* {{ClassRefItem|FastLogSettings}}
* {{ClassRefItem|FunctionalTest}}
* {{ClassRefItem|GlobalSettings}}
* {{ClassRefItem|StudioSettings}}
* {{ClassRefItem|LuaSettings}}
* {{ClassRefItem|ProfilingItem}}
* {{ClassRefItem|PseudoPlayer}}
* {{ClassRefItem|RenderSettings}}
* {{ClassRefItem|StudioTool}}


[[Category:Reference Pages]]
[[Category:Reference Pages]]