Godot Version
v.4.2.2
Question
script one
extends Node2D
var button_choice = 0
func get_variable():
return button_choice
func _on__1100_pressed():
get_tree().change_scene_to_file("res://question.tscn")
button_choice = 11
script 2
extends Label
func _ready():
get_node("/root/Gameboard").get_variable(button_choice)
if button_choice == 11:
text = "yes"
elif button_choice == 12:
text = "no"
i am trying to make a jeopardy game and it wont let me call the variable from script one in to the second script