Sound playing on tile

Godot Version

4.6.1

Question

How do I make it so if the player is on a specific part of a tile, it plays the lake sound.

extends CharacterBody2D

const SPEED = 450.0
const JUMP_VELOCITY = -1000.0
@onready var swing: AudioStreamPlayer2D = $swing

var is_jumping = false
var is_attacking = false

@onready var animated_sprite_2d: AnimatedSprite2D = $AnimatedSprite2D
@onready var jumpsound: AudioStreamPlayer2D = $jumpsound
@onready var step: AudioStreamPlayer2D = $step
var step_timer := 0.0
var step_interval := 0.35

func _physics_process(delta: float) -> void:

	if not is_on_floor():
		velocity += get_gravity() * delta


	if Input.is_action_just_pressed("jump") and is_on_floor() and not is_attacking:
		velocity.y = JUMP_VELOCITY
		jumpsound.pitch_scale = randf_range(0.9, 1.1)
		jumpsound.play()
		is_jumping = true
	if Input.is_action_just_released("jump") and velocity.y < 0:
		velocity.y *= 0.4

	
	if Input.is_action_just_pressed("attack") and not is_attacking:
		is_attacking = true
		swing.pitch_scale = randf_range(0.8, 1.2)
		swing.play()
		animated_sprite_2d.play("attack")
		animated_sprite_2d.animation_finished.connect(_on_attack_finished)
	
	var direction := Input.get_axis("left", "right")
	if direction:
		velocity.x = direction * SPEED
	
	
		if is_on_wall():
			step_timer = 0.0
		else:
			if is_on_floor():
				step_timer -= delta
				if step_timer <= 0:
					step.play()
					step_timer = step_interval
		
	else:
		velocity.x = move_toward(velocity.x, 0, SPEED)
		step_timer = 0.0
	
	move_and_slide()

	
	if direction == 1:
		animated_sprite_2d.flip_h = false
	if direction == -1:
		animated_sprite_2d.flip_h = true

	
	if is_attacking:
		return 

	if not is_on_floor():
		animated_sprite_2d.play("jump")
		is_jumping = true
	else:
		is_jumping = false
		if abs(velocity.x) > 1:
			animated_sprite_2d.play("run")
		else:
			animated_sprite_2d.play("idle")


func _on_attack_finished() -> void:
	
	animated_sprite_2d.animation_finished.disconnect(_on_attack_finished)
	is_attacking = false

The easiest way I could think of doing it is adding an area2D around your lake and starting that sound when the player is in the area2D and then when the player exits the area2D you would stop the sound.

(I considered trying to figure out a way of doing it automatically sounds and provide examples but it is a lot of work for a sound only played by a specific tile. The only benefit I see to doing it that way is if you have a procedural generated world)

here is my debug, but it’s not printing anything

check and make sure that the area2D collision mask is looking at the collision layer for the player

it would normally look like this under the area2D node