How to change local variables in a custom function?

Do you have to use a local variable? Try clicking the variable button at the top of that window.

I am not sure what local variables are used for, but I always use the other method for mine.