How can i make a Line render Delete one certian game object on collsion

So i have a grapple hook in my game i want to have a level where you can pull the wall down (deleting so the object) and the grapple hook uses a line render and since i am really dumb none of the script i have make work could anyone please help me.

try casting a ray in the direction that you “line render” is pointing, it should return whatever collider it hits first. you can check if that collider’s gameobject is a wall and delete it if it is