PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

ResizeableFaces

BasePart

Faces

The ResizeableFaces property (with an e, not ResizableFaces) describes using a Faces object the different faces on which a part may be resized. For most implementations of /BasePart, such as /Part and /WedgePart, this property includes all faces. However, /TrussPart will set its ResizeableFaces set to only two faces since those kinds of parts must have two /BasePart/Size dimensions of length 2. This property is most commonly used with tools used for building and manipulating parts and has little use outside of that context. The /Handles class, which has the /Handles/Faces property, can be used in conjunction with this property to display only the handles on faces that can be resized on a part.


Code Samples


Resize Handles

This code sample creates a Handles object and shows how to set the Faces property of the object. It also references ResizeableFaces of a part. Try placing this script in multiple kinds of parts to see how ResizeableFaces varies.

-- Put this Script in several kinds of BasePart, like
-- Part, TrussPart, WedgePart, CornerWedgePart, etc.
local part = script.Parent

-- Create a handles object for this part
local handles = Instance.new("Handles")
handles.Adornee = part
handles.Parent = part

-- Manually specify the faces applicable for this handle
handles.Faces = Faces.new(Enum.NormalId.Top, Enum.NormalId.Front, Enum.NormalId.Left)

-- Alternatively, use the faces on which the part can be resized.
-- If part is a TrussPart with only two Size dimensions
-- of length 2, then ResizeableFaces will only have two
-- enabled faces. For other parts, all faces will be enabled. 
handles.Faces = part.ResizeableFaces