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

How do I loop a song in my game?

When I add a song and put the script on it. I have problems to do make the song loop itself. I need you guys to help me please and thanks.

8 answers

✓ Accepted answer

In your song properties thick the "Looped" box

script (if you need it)

LOCAITONTOAUDIO.Looped = true

if its not that then i dont know .-.

audio = Instance.new("Sound",Workspace)
audio.SoundId = "http://www.roblox.com/asset/?id=AUDIOID"
while true do
wait(10)
audio:Play()
end

To loop a song, you must go onto the sound's audio and click on the looped option.

Then, just do something like this:

audio=game.Workspace.audio

audio:Play()

This will endlessly keep on playing the song until you use audio:Stop()

Good luck with your project!

2 comments

0

Thanks this really helped

0

No problem!

Heres the most simple version I guess..

local AudioId = [[THE SOUND ID HERE]]

i = Instance.new("Sound")
i.Parent = game.Workspace
i.SoundId = "rbxassetid://"..AudioId
wait()
i.Looped = true
i.Volume = 1

PUT THIS SCRIPT IN THE AUDIO! Very simple.

script.Parent.Looped=true

Or Just open Localscript and PUT IT IN STARTERGUI And put the Sound In Workspace and click Loop

Heres the Script

Game.Workspace.Sound:play() -- You can rename the Sound to what ever as long as you Name the Sound in Workspace the same name in the Script

Put this in your audio...

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

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