Some help with blurring screen on low health?

Im playing around with DrawMotionBlur and no matter what I do I cant get the effect to happen on a player when their health is 40 or lower? Can someone give me an example of how this would work please? Much appreciated.

Hey their I think I can help you, just change the STARTBLUR_WHEN_HEALTH to what ever number you want him start to blur on.

Add this to cl_init.lua or any client-side script:

[LUA]local STARTBLUR_WHEN_HEALTH = 20
local function TEST()
if LocalPlayer():Health() <= STARTBLUR_WHEN_HEALTH then
DrawMotionBlur( 0.1, 0.79, 0.05)
end
end
hook.Add( “RenderScreenspaceEffects”, “BlurTest”, TEST )[/LUA]

I hope this helps.

Wow i feel stupid, i had that code and had somehow forgotten the hook. Haha thanks!