your variables are declared in the _ready function, so they are only available in that scope. move them out of it to make them available to the whole script
Yag is right. To move the variables outside of the _ready function, you can simply place them in the blank space above. The blank space is typically used for declarations.