-
What do you want to achieve? Keep it simple and clear!
I am trying to play music when the player joins, lower the volume after the player clicks “Play”, and finally stops the audio. -
What is the issue? Include screenshots/videos if possible!
The audio is playing twice, then plays only one instance after clicking “Play” -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have tried:
Looking through Explorer to see if there is a duplicate of the music. There wasn’t.
Trying to restart Roblox Studio.
2 Likes
I had this problem before. Instead of having the ‘Playing’ property on the Sound set to true, you should do :Play() in a local script because the second sound is probably coming from StarterGui on the server, which is playing because the ‘Playing’ property is set to true.
6 Likes
It works now, thanks! Will mark this answer as solved.
This may an old post but I’m gonna share helpful info. Adding onto this,
this code will act like a debounce since it checks if the sound is even playing before playing it again.
if sound.IsPlaying ~= true then
sound:Play()
end
1 Like