Problems with the physics enviroment

I am currently working on a script to create console commands to change the physics enviroment. When I enter in phys_maxvelocity 10000 it does not change the tables. Once I enter the command I run lua_run PrintTable(physenv.GetPerformanceSettings()) to check if it changed, the PrintTable(settings) in the script will show what it SHOULD look like but it doesn’t when I lua_run PrintTable(physenv.GetPerformanceSettings())

Here is the script
[lua]
function MaxVelocity(ply,cmd,args)
local speed = args[1]
local settings = physenv.GetPerformanceSettings()
settings.MaxVelocity = speed
physenv.SetPerformanceSettings(settings)
PrintTable(settings)
ply:ChatPrint(“phys_maxvelocity set to '”…speed…"’")
end
concommand.Add(“phys_maxvelocity”,MaxVelocity)
[/lua]

It’s been a reported issue, I believe.

Maybe I’m being stupid but shouldn’t you convert args[1] to a number before you put it in the performance table?

Yep. tonumber(), I agree.

Yeah, I did that before but I remember it still did nothing but I will go ahead and add it.

EDIT:

Holy shit it just randomly worked, thanks for the help anyway.