CFrame has some random offset that I do not understand

I have the following line of code setting the target cframeL

CurrentTarget:PivotTo(DistanceLimitFront.CFrame:ToWorldSpace(CFrame.new(0, Mouse.Hit.Y, 0)))

However, it then creates the following offset that I do not want: (green line)

I would like the part to face the DistanceLimitFront while also following the center of the mouse by using the mouse’s Y

You just want the green thing to be located at the mouse? What is DistanceLimitFront?

DistanceLimitFront is a massive part that is always infront of the player’s character (with a offset) to act as a limit to how far they can place objects

|
|
| ----------- < Front[Player character]
|
|

Green DistanceLimitFront
Red DistanceLimitTop

Okay, so you want it to be located at DistanceFromLimit (and rotated the same way) but dropped all the way to the ground?

I would like the green part to be located at DistanceLimitFront, rotate the same way as DistanceLimitFront, except that the Y axis follows the mouse’s Y

If you still don’t get it, I am making a object placement system similar to SCP-3008, heres a reference:

@JarodOfOrbiter Okay, if you still don’t understand, how about making the green part always follow the mouse while it’s orientation is always facing DistanceLimitFront

Oh okay. I think I had it backwards then.

CurrentTarget:PivotTo(
    DistanceLimitFront.CFrame
    + Vector3.new(0, Mouse.Hit.Y - DistanceLimitFront.CFrame.Y, 0)
)

Okay, so this actually solved the issue, however I just realised this creates the next issue:


(Notice how the green part is always sticking to the front distance limit and not following along to the top distance limit?)

Do I make a new post or continue here?

That’s interesting. Does it suddenly stop following, or does it slowly fall behind the mouse the closer you get to the top?

It just stops like it’s stuck until I move my mouse into the surface area of the front limit

Do you know how should we solve this? Or should I just create a new post?

Also,
image