Changing voice_scale cvar with lua?

Hey! I’m trying to create a DNumSlider that changes the cvar called voice_scale to let players adjust other players’ voice volume easily from that derma. The problem is that when I try to do this


It says calling ‘SetInt’ on bad self (attempt to modify ConVar not created by Lua)
And if I try

RunConsoleCommand( "voice_scale", value )

It says
RunConsoleCommand: Command is blocked! (voice_scale)

Is there another way I can modify other players’ mic volume?

Thank you!

Player:VoiceVolume. Only ever change a clientside cvar if you don’t have any other choice.

That is a function that RETURNS a number that is the volume of the player.

Looks like you’re going to have to find a way to manipulate player voice volume with code and not with a cvar.

Yea, I’m asking if anyone knows a way to do so :]

The voice system is extremely limited from the Lua state and there is no way to change the audio stream at all. Refer to

Thanks for your answer!