You also shouldn’t be able to access that variable with that picture you have. Is it a local variable only in the scope of the function or did you create a variable in your blueprint class? For the function to take in and return different things you should set necessary class variables outside of the function. Keep the variables inside the function local.

Notice the usability of the function example I have here. These are the above principles applied.
Local variables are found at the very bottom of the My Blueprint window on the left side of your editor (Default)