Raycasting involves a direction and a position.

A direction is simply how far a point will travel:

```
Vector3.new(1,1,2)
```

That vector direction causes a point to go 1 stud in the X direction, 1 stud in the Y direction, and 2 studs in the Z direction.

When you call:

```
player.Character.Head.CFrame.LookVector
```

You are simply getting the direction (or slope) at which the part is looking at. It defaults to (0,0,1).

When you use it in raycasting, a proper format involves:

```
local r = Ray.new(position, direction*scale)
```

Position is from where the ray begins and goes in the Direction as far as the scale permits. A Vector with (1,0,0) inputs has a size (or magnitude) of 1. That’s why if you want more range you multiply the direction with a scale. Or if you want a specific size of the ray you Unit the direction (make the vector the size/magnitude of 1) and then multiply it with a scale for specificity.

Uniting turns a vector like (5,2,1) down to (0.9129,0.36515,0.18257) which has a size/magnitude of 1.

So:

```
local r = Ray.new(position, direction.Unit * scale) -- .Unit units a vector
```

Would get you a specific ray starting from Position going in Direction as far as Scale.

As @briana_superstar mentioned, Rays have multiple outputs.

```
local hit, position, normal = workspace:FindPartsOnRay(r)
```

Are the outputs, hit being what part/object the ray touched, position being where the position touched the object, and the normal is a vector perpendicular to the surface the object touched. (See this for more info) Normals are useful for calculating ricocheting bullets or lasers.