would set a to equal 1 yes but your concommand idea is wrong. A variable is a string an integer a Boolean or a function(because a function in Lua is basically a variable). So i’ll show you multiple ways to set a variable through console. easiest way is.
local var= 1
that just simply sets the value to 1 every time you run the command test in console simple yes? well you can go further.
I may be wrong, but when you add the concommand it is looking for you to type “test” then it looks in your code for a function named ‘a = 1’.
Since there is no function named that you can’t run it.
If you created a function outside the if and named it testVar or something, then used the concommand.Add(“test”, testVar) it would work. You should also, set an else in the if so if it isn’t 1 then it says No. So you know if it wasn’t set at least to 1. And you know the if is being run.