Move Capsule Component to (BUG)

I am trying to do a ledge system. I got the position right now, the only problem there is left, is that my character automatically goes to the middle of the cube, which is not what I want, I want my character to be able to attach to the cube on whichever x position.