Hello, I need some help to assign one specific side of a cylinder to make it be it’s frontal side. Do you know how can I do this?
Cylinders (and all base parts for that matter) already have a predefined front face, this is the face that points towards a part when you assign it’s lookVector.
Code
workspace.Cylinder.CFrame = CFrame.new(workspace.Cylinder.Position,workspace.lookPart.Position)
So that means you can´t change the front face right.
No, the front face is a hard coded aspect of a base part, but I’m not entirely sure what would require you to change the front face in the first place. Realistically you can treat any side of a part as a “front face” but that becomes redundant at that point when there is a element to rectify that headache sitting right in front of you.
The thing is, the cylinder will be resized, and I want the CFrame target position to be my mouse, but when I do this, the front part will face the target position (mouse). So I wanted to change the front face to the side that will get resized.
Why not use attachments to artificially define a “face”?
Besides, when you resize a cylinder, it’s Y and Z are both shrunk down so I’m not entirely sure I understand the system you are trying to make - there isn’t a need to arbitrarily assign a front face when you could simply manipulate the cylinder’s CFrames according to what direction you need it to face.
Try this if you want the cylinder to look at the part correctly
local unit= (APart.Position-cylinder.Position).Unit
-- ^ direction ^ origin(you can change those positions)
cylinder.CFrame = CFrame.fromMatrix(cylinder.Position,unit,Vector3.new(0,1,0))
I mean make it longer, to the left or right. You mean I need to change the cylinder´s CFrame to face the mouse, and then change CFrame´s angles?
Let me try that. the resized part and the cylinder are the same part though.