I need to play a sound while an elevator is moving between floors. The elevators is activated by a if condition if(elevatorheight < or > floorHeight). The sound is playing but is not looping. It seems that the sound is being played a lot of times.
What is the problem?