How i do make simple raycast that does something when target found?

Hi im tryna make a raycaster that if ray is found then print, how do i make the raycaster repeat until it hits the objectvalue?

1 Like

Put it in a loop then call break when you hit something or hit what you were looking for