RBX.lua.TextButton (Object)

From Legacy Roblox Wiki
Jump to navigationJump to search
SetVerb( string verb )
Returns nil
Description: Sets an internal function that is executed by the game engine when the GuiButton is clicked
Member of: GuiButton
TweenPosition( UDim2 endPosition, Enum easingDirection = Out, Enum easingStyle = Quad, float time = 1, bool override = false, function callback = nil )
Returns nil
Description: Smoothly moves a GUI to a new UDim2 position.
Member of: GuiObject
TweenSize( UDim2 endSize, Enum easingDirection = Out, Enum easingStyle = Quad, float time = 1, bool override = false, function callback = nil )
Returns nil
Description: Smoothly resizes a GUI to a new UDim2.
Member of: GuiObject
TweenSizeAndPosition( UDim2 endSize, UDim2 endPosition, Enum easingDirection = Out, Enum easingStyle = Quad, float time = 1, bool override = false, function callback = nil )
Returns bool success
Description: Smoothly moves a GUI to a new size and position.
Member of: GuiObject
Clone( )
Returns Instance
Description: Returns a clone of the object and its children, unless its Archivable property is false. The clone will have the same properties as the original object and the same descendants (except those with an Archivable property set to false). The clone's Parent will be nil.
Member of: Instance
FindFirstChild( string name, bool recursive = false )
Returns Instance
Description: Returns the first child found with a name of name. Returns nil if no such child exists. If the optional recursive argument is true, will recursively descend the hierarchy while searching rather than only searching the immediate object.
Member of: Instance
GetChildren( )
Returns table
Description: Returns a read-only table of the object's children.
Member of: Instance
GetDebugId( int scopeLength )
Returns string
Description: Returns a coded string of the object's DebugId used internally by Roblox.
Member of: Instance
GetFullName( )
Returns String path to object
Description: Returns a string with a dot (.) character separating a path of object hierarchy excluding "game".
Member of: Instance
IsA( string className )
Returns bool
Description: Returns true if the Instance is that class or a subclass.
Member of: Instance
IsAncestorOf( Instance descendant )
Returns boolean is ancestor
Description: Returns true if the object is an ancestor of descendant.
Member of: Instance
IsDescendantOf( Instance ancestor )
Returns bool
Description: Returns true if the object is an descendant of ancestor.
Member of: Instance
Destroy( )
Returns nil
Description: Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.
Member of: Instance
ClearAllChildren( )
Returns nil
Description: Removes all descendants of the Instance, but leaves the Instance itself.
Member of: Instance
Text
Property String message text
Description Sets the text that the message displays.
Member of Hint, Message, TextBox, TextButton, TextLabel
TextBounds
Property Vector2 text bounds
Description The size of the object's current Text.
Member of TextButton, TextLabel, TextBox
<onlyinclude>
TextScaled
Type bool
Description Changes whether text is resized to fit the GUI object that renders it. This is mostly used when the GUI object is being rendered with a BillboardGui, in which the text should change size as the camera's distance from the GUI changes.
Member of TextBox, TextButton, TextLabel
TextWrapped
Property bool
Description Sets whether or not text should wrap at the edges of the object.
Member of TextButton, TextLabel, TextBox
TextColor3
Property Color3 text color
Description Sets the color of text.
Member of TextButton, TextLabel, TextBox
TextTransparency
Property Number text transparency
Description Sets the opacity in which text appears.
Member of TextButton, TextLabel, TextBox
TextXAlignment
Property TextXAlignment TextXAlignment
Description Sets where the text is placed in a GUI on the X axis.
Member of TextBox, TextButton, TextLabel
TextYAlignment
Property TextYAlignment TextYAlignment
Description Sets where the text is placed in a GUI on the Y axis.
Member of TextBox, TextButton, TextLabel
FontSize
Type FontSize
Description Changes the font size of a GUI object.
Member of TextBox, TextButton, TextLabel
Font
Type Font
Description This is the font displayed in a GUI TextBox, TextLabel and TextButton.
Member of TextBox, TextButton, TextLabel
TextStrokeColor3
Property Color3 text stroke color
Description Sets the color of the text stroke.
Member of TextButton, TextLabel, TextBox
TextStrokeTransparency
Property Number text stroke transparency
Description Sets the opacity in which text stroke appears.
Member of TextButton, TextLabel, TextBox
AutoButtonColor
Type bool
Description If true the button will automatically change color when the mouse hovers over or clicks on it.
Member of GuiButton
Selected
Property Bool Selected
Description Bool that tells if object has been selected.
Member of TextButton, TextBox, ImageButton
Style
Property ButtonStyle ButtonStyle
Description Sets what the object looks like.
Member of GuiButton
Modal
Type bool
Description If true while the GUI element is visible, the mouse will not be locked when in first person mode.
Member of GuiObject
Active
Type bool
Description true will react to mouse events, and pass them to any objects layered underneath, while false won't.
Member of BillboardGui, GuiObject, HopperBin
BackgroundColor3
Property Color3 background color
Description Sets the color of the background on the item.
Member of GuiObject
BackgroundTransparency
Property Number Transparency
Description Sets the transparency of the background of a GUI. (1 is completely transparent; 0 is completely opaque)
Member of GuiObject
BorderColor3
Property Color3 BorderColor
Description Sets the color of the border around a GUI.
Member of GuiObject
BorderSizePixel
Type int
Description This property can either be 0 or 1, the former having no border, the latter having a one pixel border.
Member of GuiObject
Position
Property UDim2 Position
Description Sets the position of the GUI object in object coordinates.
Member of GuiObject
Size
Property UDim2 Size
Description Sets the size of the GUI object in object coordinates.
Member of GuiObject
SizeConstraint
Property SizeConstraint SizeConstraint
Description Sets the direction that an object can be resized in.
Member of GuiObject
Visible
Property bool
Description Determines whether the object and its descendants will be displayed.
Member of GuiObject, LoadingGui, GuiBase3d
ZIndex
Property Integer ZIndex
Description Alters the order in which GUI items are placed.
Member of GuiObject
Draggable
Property Boolean draggable
Description Whether or not the object is draggable
Member of GuiObject
ClipDescendants
Property Boolean clip
Description Clips Descendants is a property of GUI objects that decides if ROBLOX will render any portions of it's GUI descendants that are outside of the it's own borders. This is convenient for making scroll GUIs.
Member of GuiObject
AbsolutePosition
Type Vector2
Description The distance, in pixels, from the top left corner of the game window.
Member of GuiBase
AbsoluteSize
Type Vector2
Description Size of the render window in pixels.
Member of GuiBase
Name
Type string
Description The name of the object, which is often used to identify it in the context of its parent. Note that names are not unique identifiers; multiple children of an object may share the same name. In a script where you want to access an object using a name, for example, game.Workspace["Brick"], the first object found with that name is that object. This "first object" can be found in the Explorer menu.Names are great for showing a very brief title or summary of an object.
Member of Instance
Parent
Type Instance
Description The hierarchical parent of the object. When no scripts hold references to an object, it will still be maintained as long as it's parent is set to an object which does have references to it, either by other objects or scripts. The toplevel 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.
Member of Instance
Archivable
Type bool
Description Sets whether or not the object is saved when publishing or saving to file. Also sets whether or not the object is clonable.
Member of Instance
ClassName
Type string
Description A unique string per type of Instance. Should only be used as a unique identifier, as it does not reveal any information about nature of the type hierarchy the type is in. For this use, see IsA.
Member of Instance
RobloxLocked
Type bool
Description If true, the object and its descendants cannot be indexed or edited by a Script or LocalScript and will throw an error if it is attempted.
Member of Instance
DataCost
Type int
Description How much saving this instance with SaveInstance will add to DataComplexity
Member of Instance
MouseButton1Click ( )
Description Fired when the mouse has fully left clicked the GUI object.
Member of: GuiButton
MouseButton1Down ( int x, int y )
Description Fired when the mouse is in the left mouse down state on the GUI object.
Member of: GuiButton
MouseButton1Up ( int x, int y )
Description Fired when the left mouse has released the GUI object.
Member of: GuiButton
MouseButton2Click ( int x, int y )
Description Fired when the mouse has right clicked the GUI object.
Member of: GuiButton
MouseButton2Down ( int x, int y )
Description Fired when the mouse is in the right mouse down state on the GUI object.
Member of: GuiButton
MouseButton2Up ( int x, int y )
Description Fired when the right mouse button has been released on a GUI Object.
Member of: GuiButton
There is a special event for 2D GUI objects.
MouseEnter ( int x, int y )
Description Fired when the mouse enters a GuiObject, as long as the GuiObject is active (see active property for more detail). Arguments x, and y specify the absolute pixel position of the mouse.
Member of: GuiObject

There is also a special event for 3D Handle objects.

MouseEnter ( )
Description Fired when a mouse "enters" or "touches" a 3D Object.
Member of: ArcHandles, Handles
MouseLeave ( )
Description Fired when a mouse "leaves" or moves off of a GUI Object.
Member of: GuiObject
MouseMoved ( Integer x, Integer y )
Description Fired when the mouse moves or goes on top of a GUI Object.
Member of: GuiObject
DragBegin ( UDim2 InitialPosition )
Description Fired when a player begins dragging the object.
Member of: GuiObject
DragStopped ( int x, int y )
Description Fired when a player stops dragging the object. The arguments x and y represent the mouse's location.
Member of: GuiObject
AncestryChanged ( Instance child, Instance parent )
Description Fired when an ancestor of the Instance the event which is a member of child has its parent changed to parent.
Member of: Instance
Changed ( Property property )
Description Fired whenever a property of the object changes.
Member of: Instance
ChildAdded ( Instance child )
Description Fired after a child is added.
Member of: Instance
ChildRemoved ( Instance child )
Description Fired when a child is removed from the object.
Member of: Instance
DescendantAdded ( Instance descendant )
Description Fired when a descendant is added to the object.
Member of: Instance
DescendantRemoving ( Instance descendant )
Description Fired when a descendant is being removed.
Member of: Instance



This article is part of a series on GUI.
BillboardGui Frame TextButton TextLabel
ImageButton ImageLabel ScreenGui CoreGui


This navigation pane you are seeing is currently being tested. Please message Trappingnoobs feedback at My Roblox inbox!