How to make scope more smooth.

Currently in my sniper I increase the scope in SecondaryAttack in serverside, and then I set a networked variable to the scopelevel, which the client then displays. But this is abit dodgy ingame cause it takes a while for the scope to change and it just feels clumsy. How should I do this properly? The reason I have it as a networked variable is because in the clientside SecondaryAttack gets called a bunch of times for every click, making it weird.

Avoid the relay back, that’s silly. Instead try to work around the secondaryattack hook being called more than once clientside and use that.

You could try making a delay

[lua]
local curtime = CurTime()
function SWEP:SecondaryAttack()

if CurTime() < ( curtime + 0.3 ) then
	return
end
curtime = CurTime()


--scope stuff below...

end
[/lua]

In this case, if the hook is called within 0.3 seconds after it was successfully called last, it will reject it.

Have you tried IsFirstTimePredicted? Also, why just don’t call player:SetFOV on server and don’t use client for that?