How can i get variable from another node

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ktotoetoia

I 'm making a regular 2D platformer, which has platform through which you can go from bottom to top, or by pressing the S key from top to bottom (like in terraria),but i need to get player variable

:bust_in_silhouette: Reply From: exuin

First, you need to get the path to the player, like get_node(“Player”) or something like that. Then you can access the variable with dot notation, like player.variable.