Fence Placement System problem

Hello everyone, recently I created a fence placing system and its working but there’s just 1 problem. When I try placing the fence diagonally, the poles that are supposed to be dividing each piece only go on the X axis.

Supposed to be like this:

But it does this:

Most likely you forgot to offset & rotate the pillars. It would be really nice if we could see some of the code so that we can get some more information about this.

I have figured it out now thank you though