I have 2 scripts, from 2 different scenes, and I'm trying to change a variable in one of them, through the other.
In the first script, I have the variable
scoreMultiplier = 1
And in the second,
onready var score = get_node("/root/world/score").scoreMultiplier
func _physics_process(delta):
if position.y <= -10:
score += 0.05
queue_free()
But the scoreMultiplier variable doesn't seem to increment. The second script IS getting the variable, tho. if i print(score) before queue_free() it prints 1 to the console.
Any thoughts?
Thanks!