Hello I'm trying to cast three rays in total each at a different angle. The first ray (ray 2 in the picture) is easy, and the script I used to make that ray is this
local ray = Ray.new(char.HumanoidRootPart.CFrame.p, (char.HumanoidRootPart.CFrame.lookVector*5))
However, I'm trying to do that, but at an angle. To explain more thoroughly, I'll draw a picture here.
I am able to draw the Ray 2, but I tried using CFrame.Angles() to draw the Ray 1 and Ray 3 but couldn't figure it out. Any help is appreciated.

14 comments
ray-cast ha get it hhhahahahaha
you're so funny hahaha
ikr ha ????????
ha
Sorry I'm really bad at raycasting and I'm confused on how to cast the ray using the vectors?
You already demonstrated knowledge of doing it. You just did it in your question using the lookVector of the humanoid root part!
I'm confused about how to use the three different vectors, previously I only used one to cast the ray.
Updated code and explanation to explain rays and link a few articles from the api ref.
The code works and it displays 3 rays, and normally works as intended, but occasionally the angled rays go from an angle such as 30 to 180.
Can you show a gif or recording of what happens?
https://gyazo.com/771a876f47c71323868d77e399891414 The third and fourth times the beams appear is what it would ideally look like, and the rest of the times are what it should not look like.
I've also noticed that if I click once and a "bad" raycast happens, if I don't move my mouse (which is moving the HumanoidRootPart) the same exact raycast happens.
Can you show all the code you're using to perform the ray cast and position the neon laser beams? Either post a new question (accept this one) or edit it in because I'm pretty sure that it's nothing wrong with the vector rotation.
I created a new question, could you look at my code when you get the chance? https://scriptinghelpers.org/questions/68653/attempting-to-make-an-angled-raycast-but-not-working-as-intended