AlignPosition :
Constraint :
Instance
An AlignPosition is used to apply a force towards a location. Like other constraints, AlignPositions have two Attachments. In this case the attachments are constrained to be in the same position, although not necessarily in the same orientation. By default, this constraint only applies forces on Attachment0, although it can be configured to apply forces on both attachments.
Properties
PropertiesmemberhiddenProperties [toggle]
boolApplyAtCenterOfMass
When true, applies force at center of mass of Attachment0’s parent Part. When false, applied at Attachment0.
|RMD member="API:Class/AlignPosition/ApplyAtCenterOfMass"|When true, applies force at center of mass of Attachment0’s parent Part. When false, applied at Attachment0.|/RMD|
floatMaxForce
Maximum force the constraint can apply to achieve its goal. Only used if RigidityEnabled is false.
|RMD member="API:Class/AlignPosition/MaxForce"|Maximum force the constraint can apply to achieve its goal. Only used if RigidityEnabled is false.|/RMD|
floatMaxVelocity
Maximum speed the Attachment can move when converging. Only used if RigidityEnabled is false.
|RMD member="API:Class/AlignPosition/MaxVelocity"|Maximum speed the Attachment can move when converging. Only used if RigidityEnabled is false.|/RMD|
|RMD member="API:Class/AlignPosition/ReactionForceEnabled"|When true the constraint will apply force on both Attachments to achieve the goal.|/RMD|
floatResponsiveness
Used to control how quickly the constraint will reach its goal. Higher values will cause the attachments to move together quicker. Value can be between 5 and 200.
|RMD member="API:Class/AlignPosition/Responsiveness"|Used to control how quickly the constraint will reach its goal. Higher values will cause the attachments to move together quicker. Value can be between 5 and 200.|/RMD|
|RMD member="API:Class/AlignPosition/RigidityEnabled"|When set to true, the solver will react as quickly as possible to move the attachments together. When false, the torque is dependent on MaxForce, MaxVelocity, and Responsiveness.|/RMD|
|
|
When true, applies force at center of mass of Attachment0’s parent Part. When false, applied at Attachment0.
|
|
|
Maximum force the constraint can apply to achieve its goal. Only used if RigidityEnabled is false.
|
|
|
Maximum speed the Attachment can move when converging. Only used if RigidityEnabled is false.
|
|
|
When true the constraint will apply force on both Attachments to achieve the goal.
|
|
|
Used to control how quickly the constraint will reach its goal. Higher values will cause the attachments to move together quicker. Value can be between 5 and 200.
|
|
|
When set to true, the solver will react as quickly as possible to move the attachments together. When false, the torque is dependent on MaxForce, MaxVelocity, and Responsiveness.
|
Inherited from
Constraint:
|RMD member="API:Class/Constraint/Attachment0"|The
Attachment that is connected to Attachment1.|/RMD|
|RMD member="API:Class/Constraint/Attachment1"|The
Attachment that is connected to Attachment0.|/RMD|
|RMD member="API:Class/Constraint/Color"|The color of the constraint.|/RMD|
boolEnabled
Toggles whether or not this Constraint is enabled.
|RMD member="API:Class/Constraint/Enabled"|Toggles whether or not this Constraint is enabled.|/RMD|
|RMD member="API:Class/Constraint/Visible"|Toggles the visibility of this Constraint.|/RMD|
|
|
|
|
|
|
|
|
The color of the constraint.
|
|
|
Toggles whether or not this Constraint is enabled.
|
|
|
Toggles the visibility of this Constraint.
|
Inherited from
Instance:
|RMD member="API:Class/Instance/Archivable"|Determines if an object can be Cloned or saved to file.|/RMD|
|RMD member="API:Class/Instance/ClassName"|The unique name of this type of Instance.|/RMD|
stringName
A non-unique identifier for the object.
|RMD member="API:Class/Instance/Name"|A non-unique identifier for the object.|/RMD|
|RMD member="API:Class/Instance/Parent"|The hierarchical parent of the object.|/RMD|
intDataCost [LocalUserSecurity] [deprecated] [readonly]
Deprecated. Do not use.
|RMD member="API:Class/Instance/DataCost"|Deprecated. Do not use.|/RMD|
boolRobloxLocked [PluginSecurity]
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.
|RMD member="API:Class/Instance/RobloxLocked"|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.|/RMD|
boolarchivable [deprecated] [hidden]
Deprecated in favor of Archivable.
|RMD member="API:Class/Instance/archivable"|Deprecated in favor of Archivable.|/RMD|
|RMD member="API:Class/Instance/className"|Deprecated in favor of ClassName.|/RMD|
|
|
Determines if an object can be Cloned or saved to file.
|
|
|
The unique name of this type of Instance.
|
|
|
A non-unique identifier for the object.
|
|
|
The hierarchical parent of the object.
|
|
DataCost [LocalUserSecurity] [deprecated] [readonly]
|
Deprecated. Do not use.
|
|
|
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.
|
|
archivable [deprecated] [hidden]
|
|
|
className [deprecated] [readonly]
|
|
Functions
FunctionsmemberhiddenFunctions [toggle]
Inherited from
Instance:
|RMD member="API:Class/Instance/ClearAllChildren"|Removes all descendants of the object.|/RMD|
|RMD member="API:Class/Instance/Clone"|Returns a copy of the object, including descendants, but only if the object is Archivable.|/RMD|
voidDestroy ( )
Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.
|RMD member="API:Class/Instance/Destroy"|Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.|/RMD|
|RMD member="API:Class/Instance/FindFirstAncestor"|Returns the first ancestor whose Name is equal to name, or nil if none can be found.|/RMD|
|RMD member="API:Class/Instance/FindFirstAncestorOfClass"|Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.|/RMD|
|RMD member="API:Class/Instance/FindFirstAncestorWhichIsA"|Returns the first ancestor that inherits the class className, or nil if none can be found.|/RMD|
Ref<Instance>FindFirstChild ( string name, bool recursive = false )
Returns the first child found with the given name, or nil if no such child exists. If the optional recursive argument is true, recursively descends the hierarchy while searching rather than only searching the immediate object.
|RMD member="API:Class/Instance/FindFirstChild"|Returns the first child found with the given name, or nil if no such child exists. If the optional recursive argument is true, recursively descends the hierarchy while searching rather than only searching the immediate object.|/RMD|
|RMD member="API:Class/Instance/FindFirstChildOfClass"|Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.|/RMD|
|RMD member="API:Class/Instance/FindFirstChildWhichIsA"|Returns the first child that inherits the class className, or nil if none can be found.|/RMD|
|RMD member="API:Class/Instance/GetChildren"|Returns an array of the object's children.|/RMD|
|RMD member="API:Class/Instance/GetDescendants"|Returns an array containing all of the descendants of the instance.|/RMD|
|RMD member="API:Class/Instance/GetFullName"|Returns a string which shows the object's ancestry chain.|/RMD|
|RMD member="API:Class/Instance/GetPropertyChangedSignal"|Returns a signal that is fired when the specified property is changed on this object.|/RMD|
boolIsA ( string className )
Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.
|RMD member="API:Class/Instance/IsA"|Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.|/RMD|
|RMD member="API:Class/Instance/IsAncestorOf"|Returns true if the object is an ancestor of the given descendant.|/RMD|
|RMD member="API:Class/Instance/IsDescendantOf"|Returns true if the object is a descendant of the given ancestor.|/RMD|
Ref<Instance>WaitForChild ( string childName, double timeOut )
Yields the current thread until a child with the given name is found, then returns the child.
If the timeOut parameter is specified, this function will time out and return nil if timeOut seconds elapse without the child being found.
|RMD member="API:Class/Instance/WaitForChild"|Yields the current thread until a child with the given name is found, then returns the child.
If the timeOut parameter is specified, this function will time out and return nil if timeOut seconds elapse without the child being found.|/RMD|
stringGetDebugId ( int scopeLength = 4 ) [PluginSecurity] [notbrowsable]
Returns a coded string of the object's DebugId used internally by Roblox.
|RMD member="API:Class/Instance/GetDebugId"|Returns a coded string of the object's DebugId used internally by Roblox.|/RMD|
voidRemove ( ) [deprecated]
Deprecated. Do not use.
|RMD member="API:Class/Instance/Remove"|Deprecated. Do not use.|/RMD|
|RMD member="API:Class/Instance/children"|Deprecated in favor of GetChildren.|/RMD|
|RMD member="API:Class/Instance/clone"|Deprecated in favor of Clone.|/RMD|
voiddestroy ( ) [deprecated]
Deprecated in favor of Destroy.
|RMD member="API:Class/Instance/destroy"|Deprecated in favor of Destroy.|/RMD|
|RMD member="API:Class/Instance/findFirstChild"|Deprecated in favor of FindFirstChild.|/RMD|
|RMD member="API:Class/Instance/getChildren"|Deprecated in favor of GetChildren.|/RMD|
boolisA ( string className ) [deprecated]
Deprecated in favor of IsA.
|RMD member="API:Class/Instance/isA"|Deprecated in favor of IsA.|/RMD|
|RMD member="API:Class/Instance/isDescendantOf"|Deprecated in favor of IsDescendantOf.|/RMD|
voidremove ( ) [deprecated]
Deprecated in favor of Remove.
|RMD member="API:Class/Instance/remove"|Deprecated in favor of Remove.|/RMD|
|
|
Removes all descendants of the object.
|
|
|
Returns a copy of the object, including descendants, but only if the object is Archivable.
|
|
|
Sets the Parent property to nil, locks the Parent property, disconnects all connections and calls Destroy() on all children.
|
|
|
Returns the first ancestor whose Name is equal to name, or nil if none can be found.
|
|
|
Returns the first ancestor whose ClassName is equal to className, or nil if none can be found.
|
|
|
Returns the first ancestor that inherits the class className, or nil if none can be found.
|
|
|
Returns the first child found with the given name, or nil if no such child exists. If the optional recursive argument is true, recursively descends the hierarchy while searching rather than only searching the immediate object.
|
|
|
Returns the first Instance whose ClassName is equal to className, or nil, if no such object is found with that ClassName.
|
|
|
Returns the first child that inherits the class className, or nil if none can be found.
|
|
|
Returns an array of the object's children.
|
|
|
Returns an array containing all of the descendants of the instance.
|
|
|
Returns a string which shows the object's ancestry chain.
|
|
|
Returns a signal that is fired when the specified property is changed on this object.
|
|
|
Returns true if the object is an instance of the given class, or if the object's class inherits from the given class.
|
|
|
Returns true if the object is an ancestor of the given descendant.
|
|
|
Returns true if the object is a descendant of the given ancestor.
|
|
|
Yields the current thread until a child with the given name is found, then returns the child.
If the timeOut parameter is specified, this function will time out and return nil if timeOut seconds elapse without the child being found.
|
|
GetDebugId ( int scopeLength = 4 ) [PluginSecurity] [notbrowsable]
|
Returns a coded string of the object's DebugId used internally by Roblox.
|
|
Remove ( ) [deprecated]
|
Deprecated. Do not use.
|
|
children ( ) [deprecated]
|
|
|
clone ( ) [deprecated]
|
Deprecated in favor of Clone.
|
|
destroy ( ) [deprecated]
|
|
|
findFirstChild ( string name, bool recursive = false ) [deprecated]
|
|
|
getChildren ( ) [deprecated]
|
|
|
isA ( string className ) [deprecated]
|
Deprecated in favor of IsA.
|
|
isDescendantOf ( Instance ancestor ) [deprecated]
|
|
|
remove ( ) [deprecated]
|
Deprecated in favor of Remove.
|
Events
EventsmemberhiddenEvents [toggle]
Inherited from
Instance:
|RMD member="API:Class/Instance/AncestryChanged"|Fires when the Parent property of the object or one of its ancestors is changed.|/RMD|
Changed ( string property )
Fires after a property of the object changes.
|RMD member="API:Class/Instance/Changed"|Fires after a property of the object changes.|/RMD|
|RMD member="API:Class/Instance/ChildAdded"|Fires when a child is added to the object.|/RMD|
|RMD member="API:Class/Instance/ChildRemoved"|Fires when a child is removed from the object.|/RMD|
|RMD member="API:Class/Instance/DescendantAdded"|Fires when a descendant is added to the object.|/RMD|
|RMD member="API:Class/Instance/DescendantRemoving"|Fires before a descendant of the object is removed.|/RMD|
|RMD member="API:Class/Instance/childAdded"|Deprecated in favor of ChildAdded.|/RMD|
|
|
Fires when the Parent property of the object or one of its ancestors is changed.
|
|
|
Fires after a property of the object changes.
|
|
|
Fires when a child is added to the object.
|
|
|
Fires when a child is removed from the object.
|
|
|
Fires when a descendant is added to the object.
|
|
|
Fires before a descendant of the object is removed.
|
|
childAdded ( Instance child ) [deprecated]
|
|
|RMD member="API:Class/AlignPosition"|An AlignPosition is used to apply a force towards a location. Like other constraints, AlignPositions have two Attachments. In this case the attachments are constrained to be in the same position, although not necessarily in the same orientation. By default, this constraint only applies forces on Attachment0, although it can be configured to apply forces on both attachments. |/RMD|