So i have these lines of codes, they are about getting ALL the hats (and also accessories) handles from the workspace into a table for my gun system. When I shoot someone's head, if they are wearing Hats, then the ray will go through the hat, but not with Accessory.
When I try to print out the names of the handles, the handle names of the accessories are there, but somehow the ray still couldn't go through them.
Forgot to mention that this code is in a local script
I've tried some free model guns, some have the ability to go through hats and accessories, but some don't. Some of them are way too long for me to understand. So I decided to ask here for solutions

4 comments
Just a quick question, why are you trying to ignore accessories?
If an accessory is part of a character, your guns should be getting the character anyway. Try using FindFirstAncestorOfClass with Model as its argument.
I'm trying to get the ray to ignore other player's accessory, the local player is fine
Forgot to mention that this code is in a local script