How would you be able to change the direction of a raycast? This is the code I'm using:
local ray = Ray.new(script.Parent.Head.Position, script.Parent.Head.CFrame.LookVector * 50)
I tried to use CFrame.Angles to change the direction but the raycast ends going in the same direction even if I change math.rad.
local ray = Ray.new(script.Parent.Head.Position, script.Parent.Head.CFrame * CFrame.Angles(0,math.rad(90),0) * script.Parent.Head.CFrame.LookVector * 50)
How could I be able to define the direction where the raycast is facing?

2 comments
Understand that Ray.new() takes two vectors, a vector which represents the origin, and a vector that represents the direction. Ray.new(v3 origin, v3 direction). Your ray starts at v3 origin, and casts v3 direction.
But what counts as a "direction"? How could I define a direction?