extends Area2D
var score = 0
extends Area2D
var score = 0
func _on_body_entered(body: Node2D) -> void:
score = + 1
queue_free()
print(score)
You need to show a little more details.
How did you connect the signal?
What is trying to enter the Area2D?
What are your settings on the Area2D?
Show everything.
Why do you duplicate these lines?
2 Likes
You have declared extend Area2D
and var score=0
twice. Remove the second declarations.
Haha, @FencerDevLog was quicker!
2 Likes