ObjectSpace() not working properly? - pls dont ignore me

So I made a “3d Cursor” where a ray will shoot out from the camera (with a render step) to the floor,
when the ray hits the floor the cursor will be at that position

Robloximage

but when it doesn’t hit the floor, it will stay at its last position proportionate to where the player is,
so how I try to achieve this is by using (: ToObjectSpace), I do

        local Add = (TriangleCursor.CFrame:ToObjectSpace(RootPart.CFrame)).Position
        TriangleCursor.Position = RootPart.Position + Add

This is where it gets interesting because it works, but… not all the time

RobloxImagedouble

it places the cursor in two different places, one the correct position and somewhere else…
when I print the object-space thing

       local Add = (TriangleCursor.CFrame:ToObjectSpace(RootPart.CFrame)).Position

I get two positions flipping back and forth with each other…

RobloxImage2

how do I get this to be a single position?; is there a better way to doing what I’m trying to achieve?;

Thanks for reading :slight_smile: