how do i make weapons shoot trough walls - props!

i wanna know how to make weapons shoot trough walls and props please help ! :smiley: il be so happy if someone help me.

You can trace players through walls I belive, so I guess if you could get where your hitting the player and do


ply:SetHealth( ply:Health() - 50)

and all that for where you hit it might work.

Lol $10 bet that the OP does not know what to do with that string of code.

But thanks, Iโ€™ve been looking a long time for it.

ty, where do i put it?

Haha, you were right.

It is a bit more complicated then just putting that line of code into a document.

[lua]local tdata = {}
tdata.start = self.Owner:GetShootPos()
tdata.endpos = self.Owner:GetShootPos() + self.Owner:GetAimVector()*100000000000000000
tdata.filter = self.Owner
tdata.mask = MASK_OPAQUE โ€“ Best mask I could find that would work
local tr = util.TraceLine(tdata)

if tr.Entity:IsPlayer() then
bullet = {}
bullet.Src = self.Owner:GetEyeTrace().HitPos+self.Owner:GetForward()*100
bullet.Attacker = self.Owner
bullet.Dir = self.Owner:GetAngles():Forward()
bullet.Spread = Vector(0.01,0.01,0)
bullet.Num = 1
bullet.Damage = 15
bullet.Force = 2
bullet.Tracer = 1
end[/lua]

Thatโ€™s roughly what it would be (I think?). Someone check it?