I need some help understanding why waiting for the tween to finish causes the player to receive an area_entered signal twice from another area.
Commenting out await tween.finished will only increment score once, but then the tween doesn't play.
Coin scene function that fires:
func pickup():
# Stops coin from monitoring areas entering it
monitoring = false
tween.play()
await tween.finished
queue_free()```
Player scene function that fires when area_entered signal is emitted:
func _on_area_entered(area):
if area.is_in_group("coins"):
area.pickup()
emit_signal("pickup")
Main scene that increments score:
func _on_player_pickup():
score += 1
$Hud.update_score(score)
$CoinSound.play()