Well, if you have a “collect gem” style function, or anywhere you set x_gen_bool
to true, try your tween again, it is very close to correct
var t: Tween = gem_text.create_tween()
t.tween_property(gem_text, "modulate:a", 0.0, 5.0)
Looking at your other posts I highly recommend the animation player as well, very powerful tool in Godot.