How to create a static variable in blueprints?

well depending on what you are trying to do you can either cast to that blueprint if its a controller,pawn, gamestate, playerstate or gamemode.

Otherwise you can make an interface blueprint.