How do i get props to take damage?

I’m trying to make a function that spawns a barricade, and i want the barricade to remove itself if it’s HP sinks under 0. I’ve tried just setting the prop’s health to 100, but when i shoot it, the health remains the same.

Is there any way to make the prop take damage? Or at least detect when the prop gets shot?

Thanks in advance!

Breakable Tool?

I don’t know.

Are you using a prop_physics? If so why not make a SENT instead which just sets a model, health, and once it has 0 health it’ll remove itself.

How would i spawn the SENT in a lua script?

Use a variable that is unique to that entity and hook a function that subtracts from that variable to the EntityTakeDamage hook.

or you could use SetNWVar to set the Props start health and then Take it the amount you want when it gets hit if you need an example of this I think flood uses a system like that

That worked well, thanks!