Several issues with trying to make a raycast ricochet

I fixed the issue, and I’m going to be honest, I don’t even know how I did.

I decided to rewrite the script, making everything as readable as possible (since the sample that I sent looks and executes like a mess), and that somehow fixed the problem

If anyone finds this and are struggling to replicate the ricochet effect on a gun, you might have already searched for this post, but it was this post that helped me fix my problem.