I am currently making a sandbox game myself, the way I achieved this was by making the player character function as the in-game cursor. I then made scripts that would check what was in the same tile as the player character. For the advanced rail builder, I had it "select" the object I wanted to manipulate via grouping then would use that object as the base to manipulate from. This system has it's cons of course, I highly recommend you watch Slayer's tutorials and play around with the engine before settling on using request coordinates or another way of building.