Using RenderScreenspaceEffects

I am trying to add a motion blur to players that receive net message, but it must disable after ten seconds. I would need to have the post processing function only run the processing if the local player value is ‘true’, like “LocalPlayer().Blurred = true”, but have it immediately stop after a certain amount of time passes. I attempted to do something like this: “timer.Simple( 10, function() hook.Remove( “RenderScreenspaceEffects”, “ScreenBlur”, PostProcess ) end)” after I already added the hook to the blurred screen function, but the timer stopped working correctly.

To fix this, the motion blur could only happen while “LocalPlayer().Blurred == true”, and stop after it becomes false, so all the timing could be done server-side, but I don’t know how to do that, because RenderScreenspaceEffects must be ran clientside, and anything ran in that hooked function is looped at the framerate of the player. Help?

Entity:SetNWBool Set this serverside and Get it clientside

Net library usage would be better for this task.

@OP, without code we cannot help.

[lua]
–server
util.AddNetworkString(“MyMod_BlurPlayer”)
–Code that starts the blur
net.Start(“MyMod_BlurPlayer”)
net.Send(player_to_blur)

–client
net.Receive(“MyMod_BlurPlayer”,function()
hook.Add(“BlurHookHere”,“MyMod_blur”,myblurfunction)
timer.Create(“MyMod_StopBluringPlayer”,10,1,function()
hook.Remove(“BlurHookHere”,“MyMod_blur”)
end)
end)
[/lua]