Raycasting to ignore all blocks that are in the way and only take a raycast in one coord

i am making a game and i need to make a raycast at a certain coord ignoring all the blocks that are before. can anyone explain how?

nevermind i used linecasts with vector3 vars