How do i place a crosshair to my ray cast?

the only method i’ve found (printed below) where it just gets basically the middle of the screen and if my ray cast isn’t aligned to that, then the whole aim is off.

function OnGUI () 
{
	GUI.Label(Rect(Screen.width/2 , Screen.height/2,100,100),textureDisplay);
	

}

my shoot script(part of it)

function RayShoot()
{
	var hit: RaycastHit;
	//var directionRay = Camera.main.ScreenPointToRay(Screen.width/2, Screen.height/2);
	var directionRay = transform.TransformDirection(Vector3.forward);
	Debug.DrawRay(transform.position, directionRay * range, Color.red);
	
	
	if(Physics.Raycast(transform.position, directionRay, hit, range))
	{
		if(hit.rigidbody)
		{
			hit.rigidbody.AddForceAtPosition(directionRay * force, hit.point);
			hit.collider.SendMessageUpwards("ApplyDamage", damage, SendMessageOptions.DontRequireReceiver);
		}
		
		
	}

No need to do:

var direcitonRay = transfrom.TransformDirection(Vector3.forward);

Instead, a transform.forward will give a vector along the Z of that transform based on how it is rotated.

In both cases, it depends on what the shoot script is attached too. If it is attached to the camera, then that will be the ray right from the center of the screen into the scene.