Help with FOV script

void CheckForWalls()
{
Collider wallsInRadius = Physics.OverlapSphere(transform.position, wallRadius, runnableWall);
for (int i = 0; i < wallsInRadius.Length; i++)
{
Transform wall = wallsInRadius*.transform;*
dirToWall = (wall.position - transform.position).normalized;
if (Vector3.Angle(transform.forward, dirToWall) < checkAngle / 2)
{
if (Physics.Raycast(transform.position, dirToWall, VisibleReach, runnableWall))
{
Debug.Log(“WALL IN RADIUS”);
}
else { Debug.Log(“WALL NOT IN RADIUS”); }
}
}
if (!isWallInRadius) StopWallrun();
if (isWallInRadius) canDoubleJump = true;
}
Why does it not Debug.Log if the wall is not in radius?

Because you never declare your function. Basically void CheckForWalls()
is just storing code for use later. What you need to do is run this but in void Update()
that should work. You could also just write CheckForWalls(); in update to stay organized.