Hi - I’ve made a script for a shotgun tool and been having this issue ever since the start.
Whenever I shoot the gun, it’ll sometimes hit the owning player despite the owning player being on the ignore list. I’ve tried searching for fixes but I can’t seem to find anyone who has the same problem as me.
The raycast is being done on the server, if this could be the issue let me know ASAP since I have no idea what I could change to fix this.
I’ve so far tried to:
Disable all scripts that change the CFrame of the characters arms, root part etc.
Create a highlight and print of what the hit part is, all printing one of the arms and having this highlight appear on the arms.
I don’t want to disable the arms’ CanQuery since it is a PVP game, I also don’t want to have to move the attachment to the end of the gun since it’ll allow the player to shoot through walls.
I’ve labelled the images on what each parts of gun script is below. Any and all help would be appreciated!
Hit detection & Debug
As you can see below, the players arms are being highlighted and printed which means the ignore list isn’t working as intended

The table even shows that the using players character is within the ignore list, as well as all of the guns parts themselves.
(Here is an image of the model & attachment that the raycast starts from)





