Trying to make a tool where you throw down a spinning motion detector and it connects to a wall/floor/ceaing the corect way up depending on the surface its on. I know how to make the rest of the tool but I'm clueless to how to do this part of it.
Perhaps you can use CFrames to do it. Get the part that was touched and then read the orientation values of that part's CFrame. To make it "the correct way up" just copy the touched part's values to make it the same orientation.