local part = workspace.Part
local raycast = workspace:RayCast(part.Position, part.CFrame.LookVector * 5)
This would shoot a ray from your part forwards by 5 studs right? But what if you wanted to move it upwards & forwards so instead of shooting in front it shoots in a slanted direction? How does the direction part of rays work?
local part = workspace.Part
local raycast = workspace:RayCast(part.Position, Vector3.new(0,0,-5))
Oh I see, also say I was making a hitbox and I had 5 raycasts going upwards, downwards, to the right, to the left, and to the front of a part. Would I need to create 5 variables, or is there an alternative to make my code less consistent/spammy?