Maybe it’s the way you worded it, but I’m confused on what you’re trying to achieve? The first image looks like a bullet path is being draw from the gun to some distance directly in front of it.
What position? What unexpected behavior is occurring? I’m a little lost, sorry.
After re-reading the post, I see that the red part (which looks to be above the NPC’s head, but is against the wall) is the LookVector that you’re trying to draw the bullet to?
Hope this help you understand.
The lookvector position should same as the blue color part but it go red color block and make the bullet go shoot at wrong place.
Ah I see what you’re talking about now. Instead of using the LookVector to determine where the bullet goes, why not use the :ToWorldSpace() function that you used to display the blue part?
Edit: The function where you visualize the bullet might help.