Viewmodel Gun Issue

I have made a viewmodel weapon system, however when I shoot a gun and It’s clipped through a wall, it has an issue (I’m not using the viewport frame method because the lighting gets ruined). Basically, the ray being casted either goes through the wall or somehow gets casted behind the weapon. I’ve searched around the developer hub for about 30 minutes and have found nothing that suits my needs. How would I be able to get the ray to cast to the wall no matter how close the player is instead of from the muzzle point that I have set up? (Keep in mind I would like to keep the current method I am using right now since I am using a beam to see where the “bullet” travels to.)

As you can see from this video I have provided, there are no bullet holes showing, and I believe they show up on the bottom of the part that I am shooting into for some reason.
https://gyazo.com/04c4c41c1c3d5f7a855d9ee19d4dcd8a

bump, still having this issue, help is appreciated

Raycasts ignore parts that they start inside of. Check if the raycast is in a wall, and if it is, move its origin backwards a bit.

solved this on my own, thanks for the help though

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.