I’ve tried that and it still doesn’t fix the issue
Sound.Loaded:Wait()
Sound:Play()
Hi, is anyone still having trouble with this? Particularly if you’re using a sound longer than 0.1 seconds, or if your use case requires the sound file to be very short? We think this should have been fixed for a while.
Hello: Yes, I am having this issue currently. It consistently happens to me with very short sounds. I have one 0.023 length sound that cuts out occasionally from this bug.
This is happening to me too. The sound works just fine when manually playing it in the explorer, but the sound doesn’t play when using :Play() with a script
Bump, It’s still not fixed after three years. I set my file length to 4 second, the delay is still present
There is one workaround, which is to upload a new longer looped version of the sound and use both for different cases, but that literally costs robux
Im having a difficult time using the gui hover sounds that roblox itself has uploaded like Roblox GUI - Hover 03 - Creator Store heck this audio doesnt even play on the website at all too. The audio does work which is evident if you set the playback speed to 0.5, but otherwise its like 50/50
Hey all, letting everyone know that we managed to reproduce this for very short sounds and have some idea of what causes it. Finding a fix has been tricky but we’re working on it.
@AceOfSpades If you have the asset id for the 4 second sound that doesn’t play when you call :Play() on it, I can take a look and see if it reproduces for us - we’ve only had this happen for very short sounds so far.
Hi, we rolled out a change today that we believe fixes this issue (specifically when the sound file is very short) - it at least fixes the case in our known repro. Let us know if it’s still happening for you, and if you have a different repro that would help!
Hi, this issue seems to persist for this sound playing where it occasionally fails to play.
The following code is how I am currently playing this audio and I’m worried if it’s just an issue with the file itself, as no other sounds have had issues playing through this code.
In this scenario, a local script clones a sound instance which is then parented by the LocalPlayer, played, and promptly deleted (even after increasing this lifespan the audio still occasionally fails to play entirely).
local originalSoundEffect: Instance? = SOUND_EFFECT_CONTAINER:FindFirstChild(name, true)
if not originalSoundEffect or not originalSoundEffect:IsA("Sound") then
return
end
local soundEffectClone: Sound = (originalSoundEffect :: Instance):Clone() :: Sound
soundEffectClone.SoundGroup = SOUND_GROUP
soundEffectClone.Parent = parent or LocalPlayer
soundEffectClone:Play()
Debris:AddItem(soundEffectClone, soundEffectClone.TimeLength)
Through a little testing, it appears your sound’s time length is short enough to the point where Debris
destroys it before it has time to begin/complete playback. I see how your code should make sense, but the sound engine is not guaranteed to align with it. Instead of playing the sound, enable PlayOnRemove
, and destroy the sound after it’s been parented. Ideally, you would play the same sound and never destroy it
I changed my code for that method but the sound still occasionally doesn’t play, but it works fine for you?
local soundEffectClone: Sound = (originalSoundEffect :: Instance):Clone() :: Sound
soundEffectClone.SoundGroup = SOUND_GROUP
soundEffectClone.Parent = parent or LocalPlayer
soundEffectClone.PlayOnRemove = true
soundEffectClone:Destroy()
I recommend starting your own post if you’re having issues. The code works for me, which means it’s not an issue with Roblox. You’ve likely set up unfavourable conditions for the sound’s playback
Hi all, we had to roll back the previous fix because of an issue, but we’ve hopefully worked it out and the fix should be live again. If you’re playing a very short sound and are still seeing this, let us know!