i am having an issue where 2 audiostreamplayer2d's arent playing in a script, i edited some other scripts and suddenly these 2 audiostreamplayer2d's arent playing anymore, and i dont know how to fix it

here is the script where the 2 audiostreamplayer2d's are in
(just to be specific, chomp_1_player and chomp_2_player are the audiostreamplayer2d nodes):

extends Node

class_name PelletsManager

var total_pellets_count
var pellets_eaten = 0



@onready var chomp_1_player = $"../soundPlayers/chomp1_player"
@onready var chomp_2_player = $"../soundPlayers/chomp2_player"
@onready var points_manager = $"../pointsManager"


@onready var powerpellet_player = $"../soundPlayers/powerpellet_player"

@export var ghost_array: Array[Ghost]

var eaten_ghost_counter = 0

func _ready():
	var pellets = self.get_children() as Array[Pellet]
	total_pellets_count = pellets.size()
	for pellet in pellets:
		pellet.pellet_eaten.connect(on_pellet_eaten)
	
	for ghost in ghost_array:
		ghost.run_away_timeout.connect(on_ghost_run_away_timeout)

func on_pellet_eaten(should_allow_eating_ghosts: bool):
	
	if !chomp_1_player.playing:
		chomp_1_player.play()
	else:
		chomp_2_player.play()
	
	if should_allow_eating_ghosts:
		powerpellet_player.play()
		for ghost in ghost_array:
			if ghost.current_state != ghost.GhostState.STARTING_AT_HOME:
				ghost.run_away_from_pacman()

	
	if pellets_eaten == total_pellets_count:
		get_tree().change_scene_to_file("res://SCENES/main2.tscn")

func on_ghost_run_away_timeout():
	eaten_ghost_counter += 1
	if eaten_ghost_counter == ghost_array.size():
		points_manager.reset_points_for_ghosts()
		eaten_ghost_counter = 0
		powerpellet_player.stop()
  • xyz replied to this.

    xyz ok, i wroteprint("testie") (if print is considered a breakpoint) on the function where the sound players are in, it doesnt print "testie" so theres that

      SuperGibaLogan i found out one of the soundplayers only plays when i touch a different type of pellet
      so i need to play on every type of pellet including normal ones (the normal ones are the small regular pellets)

      EDIT: i fixed the problem