How do you play a sound without restarting it?

So, sounds can be played using the :Play() function, but doing this restarts the sound if it was already playing at the time.
This is not ideal for sound systems where the sound is being played repeatedly, as the sound can sometimes restart before it is actually heard (some sound effects have silence at the start for whatever reason).
It can be done on the client with SoundService:PlayLocalSound() but this method forces the sound to be on the client, even if SoundService.RespectFilteringEnabled is off.
My sound system is on the client, but it still needs to be replicated, so using PlayLocalSound() will not work.
All help is appreciated.

Use Sound:Resume, and you can use Sound:Pause to pause the sound so that when you :Resume it it will go back to where it was before pausing

1 Like

That is not what I’m looking for.
The sound needs to fully play to the end even if I use :Play() while it is already playing, which would mean there are two sounds playing at the same time, but only one sound object.
I don’t know why roblox has added SoundService:PlayLocalSound but has not added SoundService:PlaySound.

(post withdrawn by author, will be automatically deleted in 1 hour unless flagged)

You can create a clone, then delete it after. Something like this.

local Sound = Sound -- Set to sound
while wait(0.1) do
local Impostor = Sound:Clone()
Impostor:Play()
wait(Impostor.TimeLength) -- I think that's the right variable to use i forgot
Impostor:Destroy()
end
2 Likes

Based on the title, you’re asking for the sound to resume? Can you be a lot more specific and clear as to what you want?

use debris its much better and dosnt require the wait segment

thats true, but the fun fact this topic was 3 years ago oh god

lol ur right coincidence that you looked at this near the same time XD

1 Like