I am a amateur scripter who is just starting with ray casting . I have managed to create a automatic turrent gun that shoots things in a specific radius , all the code is done except for the fact that it shoots through walls. I have been trying to find tutorials on youtube on how to do it but they all either are bad at explaining or are outdated. Can someone please tell me how to do this ?
If you right downa script for me to see use :
(local torso) as the target and ending point of the ray
(local barrel) as the Starting point of the bullet and starting point of the ray
(local distance) as the max range of the turrent
I’m going to guess that you haven’t seen the devhub resources for this since you said that you’ve only looked tutorials on youtube. Here’s the helpful startingp oint
To add to what you said, I think @Mioxity is looking for raycast filtering and should look into that for more detailed information, but that post has some info on it already.