Part
Summary
Properties
Properties of a Part, in the order they appear on Vortex Studio.- Color:
Color3 - Transparency:
Float - Material:
Enum.Material - Cast Shadow:
Boolean
Appearance
Behaviour
Methods
- Clone:
Part - Destroy:
nil - FindFirstChild:
Instance|nil - FindFirstChildOfClass:
Instance|nil - GetAttribute:
Variant|nil - GetAttributeChangedSignal:
Signal - GetAttributes:
{ [string]: Variant } - GetChildren:
{ Instance } - GetDescendants:
{ Instance } - GetPropertyChangedSignal:
Signal - IsA:
Boolean - SetAttribute:
nil - WaitForChild:
Instance
Properties
Anchored
Boolean
Whentrue, the given part will be unable to move via interactions with the environment.
Whenfalse, the part will experience gravity and forces from other parts.
CanCollide
Boolean
Determines whether thePartis given physics collisions, or whether it can phase through other parts.
Note: APartcannot be unanchored while collision is disabled.
CFrame
CFrame
Sets the position and rotation of thePartas a single transform.
ClassName
string
The runtime class name of thePart.
Cast Shadow
Boolean
Controls whether or not thePartwill cast a shadow. This can be used to save performance with part’s whose shadows cannot be seen, or for glass parts which realistically would not create a shadow.
Color
Color3
Determines the visible color of thePart. Will also affect the part’sMaterialcolor.
Material
Enum.Material
Determines whichMaterialtype to apply when rendering thePart. Currently this has no effect other than visual.
Name
string
The name of thePart, and its label in the explorer.
Orientation
Vector3
The rotation of thePartin degrees along each axis.
Parent
Instance|nil
The containingInstanceof thePart, ornilwhen it has no parent.
Position
Vector3
The position of thePart, in World-space.
Rotation
Vector3
The rotation of thePartalong each axis.
Size
Vector3
The size of thePartin each dimension (width, height, depth).
Transparency
Float
Sets thetransparencyof the part from0(opaque) to1(invisible). When drawing shadows, all parts are treated as opaque regardless of theirtransparency. Unless it is set to1, where the part does not render at all.
Truss
Boolean
If apartis a truss part, then thePlayeris able to climb the part by walking up to it. It is recommened to keep truss parts anchored, as they otherwise produce unpredictable effects.
Methods
Clone()
Part
Creates and returns a copy of thePart.
Destroy()
nil
Destroys thePart.
FindFirstChild()
Instance|nil
part:FindFirstChild(name: string)
Returns the first direct child with the suppliedname, ornilwhen none is found.
FindFirstChildOfClass()
Instance|nil
part:FindFirstChildOfClass(className: string)
Returns the first direct child whose class matchesclassName, ornilwhen none is found.
GetAttribute()
Variant|nil
part:GetAttribute(name: string)
Returns the value stored under the supplied attributename.
GetAttributeChangedSignal()
Signal
part:GetAttributeChangedSignal(name: string)
Returns an event associated with changes to the supplied attributename.
GetAttributes()
{ [string]: Variant }
Returns a table containing thePartattributes.
GetChildren()
{ Instance }
Returns the direct children of thePart.
GetDescendants()
{ Instance }
Returns the descendants of thePart.
GetPropertyChangedSignal()
Signal
part:GetPropertyChangedSignal(property: string)
Returns an event associated with changes to the supplied property.
IsA()
Boolean
part:IsA(className: string)
Returns whether thepartis an instance ofclassNameor one of its ancestor classes.
SetAttribute()
nil
part:SetAttribute(name: string, value: Variant | nil)
Sets the attributenametovalue. Passingnilclears the attribute.
WaitForChild()
Instance
part:WaitForChild(name: string)
Waits for and returns a direct child with the suppliedname.
Events
Changed
Signal
An event associated with changes to thepart.
Touched
Signal
An event associated with physical contact with thepart.
TouchEnded
Signal
An event associated with the end of physical contact with thepart.
Testing Notes
These observations are from Vortex Studio 0.3.4 and may differ in later releases.
Changed, GetPropertyChangedSignal, and GetAttributeChangedSignal expose
connectable events, but changing the corresponding property or attribute does
not deliver callbacks. Touched and TouchEnded are connectable; their event
delivery has not been established.