Rn i got it taking the forward vector of the gun (trigger handle) with the y multiplied by 1,000 whenever the y of the surface normal from the raycaster is >= 1 or <= -1 (if surface normal is the floor or ceiling).
I know my method cant be practical 🤣 but i tried so much, idk y its this hard. I thought it would just be the forward vector of the gun, but with the y of the surface normal, but when i do that, it works but tilts the object a little upwards after setting the transform to the position of the hit position, and rotation as my 'method'.