Check the Raycast functions.
Cast a raycast every X ms from player to the enemy, if true play music.
Maybe check the distance like vegetamaker said, so it doesn’t play if he’s far in the distance.
Check the Raycast functions.
Cast a raycast every X ms from player to the enemy, if true play music.
Maybe check the distance like vegetamaker said, so it doesn’t play if he’s far in the distance.