How can I check the part's size?

Hello, I have started working on an cover algorithm for my AI, it is calculated. As, you can see the picture.
image
Where the ray hits, it will finalize the position to the opposite of the wall.
As, you can see it works.

THE PROBLEM:

The issue I am having is, I want to check the X or Z axis size of the Wall. I want to calculate as per that, so that position does not go inside the wall. I don’t want to manually finalize the position.

here the code:

workspace.CHECKING.CFrame = holePart.CFrame + (-holePart.CFrame.UpVector * 10)

holePart is consider as shown in the image above.