Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to loop sound?

I tried this.

while true do
	script.Parent.Sound:play() loop
end

[[-- Sound is in script and sound is set on loop?

2 answers

✓ Accepted answer

First of all your shouldn't use while true do end without a wait() like this

while true do wait(1)
 -- script
end

And second your sound will never play because you're trying to make it play() forever, but first of play() function the sound loads, resuming, the sound will load forever and not play.

In your sound's object, go to it's properties and set "Looped" to true.

If you want to set it via script use this line of code:

script.Parent.Sound.Looped = true
script.Parent.Sound:Play()

And it'll play forever.

I hope I help.

If you use while true do, it loops it.

while true do
script.Parent.Music:Play()
end

Or, simply go to your sound and then look under properties and check "Looped"

Hope this helped.

This discussion is preserved as it was. New answers, comments, and votes are closed.