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

How can I make it so it loops the sound?

I need this script so it will loop the sound.

local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=137847809" --Change the last numbers of the link to the id of your audio.
sound.Parent = script.Parent
sound.Volume = 50
sound:play()

3 answers

local sound = Instance.new("Sound")
sound.SoundId = "http://www.roblox.com/asset/?id=137847809" --Change the last numbers of the link to the id of your audio.
sound.Parent = script.Parent
sound.Volume = 50
sound.Looped=true
sound:play()

3 comments

0

2ways

0

owow

0

how do i stop the looping with another script >:(

Try adding sound.Looped to your script, true for it to Loop the sound over and over again repeatedly until set to false or :Stop(), or false for it to only :Play() once. sound.Looped = true Loops the sound. sound.Looped = false Doesn't loop the sound. I hope this helped!

Actually you no longer need a script, just move the audio to SoundService, then go to properties and scroll down till you find the word Loop with an unchecked box next to it. Then you can click it and it will loop. Also make sure to scroll down a bit more and enable Playing or it wont play in-game.

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