I want to make camera look in the direction of X axis of attachment.
I Used worldCFrame, toWorldSpace, etc. but didnt work. When using worldCFrame camera goes to position of attachment but orientation doesnt seem correct if we assume the face of attachment is that yellow vector. It can be solved by LookAt but thats not right way to solve.
The direction of the primary (yellow) axis of an attachment is Attachment.WorldAxis I am pretty sure.
And if you want the secondary axis of the attachment to be the UpVector, you can use Attachment.WorldSecondaryAxis.
With these 2 properties, you can create the matrix you need for CFrame.fromMatrix().
local LookVector = -Attachment.WorldAxis -- For some reason Roblox needs a negative LookVector
local UpVector = Attachment.WorldSecondaryAxis
local RightVector = LookVector:Cross(UpVector) --> (Correct me if I am wrong here)
local Position = ...
local CFrame = CFrame.fromMatrix(Position, RightVector, UpVector, LookVector)