Godot Version
v4.3.stable.official [77dcf97d8]
Question
Hey there, I’m still quite new to GDscript and programming in general, but I’m trying to put my coursework into practice. I’ve learned that the set_loops() member function is supposed to loop a tween indefinitely if called without an argument. However, the function I’ve written will only rotate the node once and halt. Where am I going wrong?
func play_spin_animation() → void:
var asteroid := get_node(“.”)
var revolution := 2 * PI
var duration := 3.0
create_tween().set_loops().tween_property(asteroid, “rotation”, revolution, duration)