Sounds sometimes dont play even though I use a simple :Play() to play them

This wasnt an issue i was having before? I feel like it could be linked to playing sounds from the SoundService (Since i previously used replicated storage for sounds)

Here is the code i am using:

local SoundService = game:GetService("SoundService")
function SoundController:Play(soundName, parent)
	local sound = SoundService:FindFirstChild(soundName, true)
	if sound then
		if parent then
			sound = sound:Clone() 
			table.insert(self.ExtraSounds, sound)
			sound.Parent = parent
			
			if not sound.Looped then
				sound.Ended:Connect(function()
					sound:Destroy()
					self.ExtraSounds[sound] = nil
				end)
			end
			
		end
		print("Playing sound")
		sound:Play()
		return sound
	else
		warn("Sound not found", soundName)
	end
end

I dont think it is a system issue since i tried it on multiple platforms and received complaints from multiple players

Here is a video which shows what i mean:

Expected behavior

The sound should be playing as normal without skipping any sounds.

Just for extra information (I’m not a staff member) - how long is the sound effect? Is there several seconds of silence afterwards causing each individual sound to overlap? I don’t know if Roblox has issues with too many sound effect tracks, but it’s worth a look.

Apologies for the late reply, this track that is shown in the video is 0.145 seconds. I have also had the same issue with other tracks which are longer (1-2 seconds).

This is just an acknowledgment announcement!

We’ve filed a ticket into our internal database for this issue, and will come back as soon as we have updates!

Thanks for flagging!

1 Like

The issue happens when you try to play the sound before it has loaded. To fix this, you need to wait until the sound effect loads in before playing it. There is an event and a boolean called Loaded and IsLoaded (respectively)

Perfect! Thank you, I appreciate the fast response :slight_smile:

In the video I sent I’m playing the same sound over and over. It just sometimes doesn’t play

@ahmedluai22 yeah it wont matter because you never wait for them to load, please try the solution i gave you

It wont make a difference. It is already loaded if it played the sound once already.