How do i make RTarget.position = new Vector3(RTarget.position.x, RTarget.position.y, LTarget.position.z + 0.2f); not ignore rotations

I wand to move the Rtartget infront of Ltarget by .2f but if i do this and rotate the parent it just goes in the z axis ignoring the rotation so i want it to be the z axis of the object not the world z axis

Here is my code:

RTarget.position = new Vector3(RTarget.position.x, RTarget.position.y, LTarget.position.z + 0.2f);

Well, of course .position is a world space position so the z component is the position along the world z axis. What you actually want to do is

RTarget.position = LTarget.position + Ltarget.forward * 0.2f;

an alternative would be

RTarget.position = LTarget.TransformPoint(new Vector3(0f, 0f, 0.2f));

Here we define a point in local space that is 0.2 in front of LTarget in the LTargets’ local space and transform it to a world space position.