Topic was automatically imported from the old Question2Answer platform.
Asked By
szccornish
i have been trying to make my bar go UP and DOWN (Hide and reveal) using a tween, but nothing happens. i wanted it when i click the bar with my left mouse button, its toggled up and down. do you have any idea whats wrong with my code? or did i miss something.
extends Node2D
onready var tween = get_node(“Bar_Tween”)
func _ready():
var Revealpos = Vector2(112,176)
var Hidepos = Vector2(112,208)
if Input.is_mouse_button_pressed(BUTTON_LEFT):
tween.interpolate_property($Bar_BG, "rect_position", Revealpos, Hidepos,1.0,Tween.TRANS_LINEAR, Tween.EASE_IN_OUT )
tween.start()