Raycast error

Please help me it doesn’t show eny errors but it doesn’t work.

here is script:

using UnityEngine;
using System.Collections;

public class RockPickUp : MonoBehaviour {
	
	void Update () {

		var fwd = transform.TransformDirection(Vector3.forward);

		RaycastHit hit;

		if (Physics.Raycast(transform.position, fwd, out hit)) 
		{
			if(hit.distance <= 5.0 && hit.collider.gameObject.tag == "PickUp")
			{
					//I want the pick up script so when you come closer to the rock and pres E it shoes +1 in my inventory, 
					//i know how to do the inventory stuff but i don't know raycast please help
			}
		}
	}
}

i think this is the problem

if (Physics.Raycast(transform.position, fwd, out hit, 100)) 

just by adding the 100 at the end may help