Hi, I've just started with Godot this week without much experience at all with coding.
I'm trying to create a simple Flappy Bird style game without using a tutorial to challenge myself with problem solving.
My problem:
I'm trying to get my player (KinematicBody2D with AnimatedSprite and CollisionShape2D) to die when colliding with my pipes (Sprite with StaticBody2D and CollisionPolygon2D) but I can't seem to get it working.
This is my code I have for my user to try and implement this so far but it's not working:
func _on_body_entered(body):
if body.get_name() == "obstacle":
get_tree().reload_current_scene()
Any help would be greatly appreciated, thanks!