PlaySoundAtEntity("amb_piano", "amb_mansion_gallery_piano_2D.snt", "ScriptArea_6", 0, false);
StopSound("amb_piano", 0.5);
That should fix it. Have a look at the two codes on the Engine Scripts Page.
void PlaySoundAtEntity(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound);
void StopSound(string& asSoundName, float afFadeTime);
Both of the codes have a value called
asSoundName, which you should think of as a name that you give the sound. The name is handled internally - so you define a name for the sound and then wish to mess around with it later, you reference the SoundName in StopSound();. In the case of the above, since you did not define a name of a sound to stop, it continues to play. I simply made the SoundName into
amb_piano.
This does not just apply to sounds - other codes also use internal names when being modified in script. Some examples are SetLightVisible();, AddQuest();, CompleteQuest();, GiveItem(); and RemoveItem();.
Think of the internal name as the name of something in the Level Editor or a newly created object when created in Script (Start/StopSound). The internal name of your ScriptArea to start playing the sound is
ScriptArea_5, thus, whenever you're referring to that ScriptArea, you simply type its name in the appropriate code string.