So, I have been working on a raycast pistol, until now the best solution to simulating recoil I had was just offsetting the bullet hole a randomized amount from the mouse position, (ray uses same offset). But this causes some problems when offsetting more than 0.2 studs. Now, I was thinking of just creating the holes at the end of the ray, but I do not really know how to do that. I am not asking for code, just some guidance on what I might be able to use.
COMMUNITY QUESTION
Is there a way to detect where a ray ends?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
The Raycast should return the Part and Position (where the Ray actively ends by contact) automatically from where the constructor is called. You can optionally declare this data within a variable if allocating it within the Raycast line.
Not only the part and position. It returns the Part, End Position, Surface Normal, and Material.
What about an animation?
No worries, already figured it out and made it