to make bullets penetrate walls/players, first of all you need to be using rays(whether you use them to simulate a projectile or just hitscan doesn’t matter)
next, on an impact with a surface, calculate a position far on the other side of the wall
has to be FAR if you care about piercing through very thick parts(not longer than workspace:raycast though, so like 600 studs, it won’t matter if your parts are reasonable thickness) because otherwise the second ray would start inside the hit part and then not be able to hit anything
cast a ray directly backwards from that position, with a whitelist so it can only hit the part the first ray hit
the point that the second ray hits is where the bullet exits the surface, so just cast a ray/move the projectile and continue to move it
for players only its a lot more simple especially because you don’t care about the depth or the exit pos of the bullet
just store a number for each bullet fired(ex. PierceMax)
when a ray hits a player:
subtract 1 from the number,
fire another ray from the position the first ray hit(make sure to ignorelist/blacklist the character you hit),
repeat(fire another ray, hits another player, etc etc) until PierceMax reaches 0