I'm making a horror map and i wanted to make a room that when you enter, the door behind you closes. So first things first I started doing the testfor command and with that the setblock command for the iron door to shut but that worked perfectly. But i wanted to make a door shut sound as well but the problem is that whenever you walk in the range of the testfor block it plays the door shut sound again.. I don't really mind that the setblock command keeps going if you walk near because they won't notice it anyway because the door is always there.
How do I make it that the sound plays only one time and not everytime you walk in range of the testfor command block??
Thanks for reading this
I took a Screenshot to make it more logical the commandblock with the arrow is the one that needs to go only once
[P.S. I'm not really good with redstone and the latest commands ;p]