A little raycast thing I made idk Made the ray detection a bit better.
It detects if the ray is touching the wall because the start of the ray is moving really fast to the end of the ray (which is the other circle on the other side of the wall that you can move with your mouse). If it touches the wall, it detects that the ray is touching the wall, else it's false.