How to get the middle points of the face of a part?

Hello.
There is something I’ve been trying to do where I can get the face of an object (right, left, front) and make an attachment or the camera face at that certain point, like camera angles in a region.
I’ve tried multiple ways of doing this, mostly using this block of code;

local at = Instance.new("Attachment",workspace.oog) at.Position = workspace.oog.Position * (workspace.oog.Size.X/26) at.WorldOrientation = workspace.oog.CFrame.RightVector at.Visible=true

This piece of code basically gives me this effect:


…Except it only matches that size.
Any other size like this will fail.

So I’ve been trying to make a perfected script to fix this bug.
Any help?

local at = Instance.new("Attachment",workspace.oog) 
at.WorldOrientation = workspace.oog.CFrame.RightVector
at.Visible=true

at.Position = Vector3.new(workspace.oog.Size.X/2,0,0) --along x axis of part
wait(1)
at.Position = Vector3.new(0,workspace.oog.Size.Y/2,0) --along y axis of part
wait(1)
at.Position = Vector3.new(0,-workspace.oog.Size.Y/2,0) --on the other side of the part
1 Like

This worked great. Thank you for your help.