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

How do u loop a song?

This is how i looped mine but its still not working! and i waited 5 secs.

wait(5)


local musicholder = Instance.new("Model")
musicholder.Parent = game.Workspace
musicholder.Name = "MusicPlayingModel"


local musicplayer = Instance.new("Sound")
musicplayer.Parent = game.Workspace.MusicPlayingModel
musicplayer.SoundId = "http://www.roblox.com/asset/?id=182079456"
musicplayer.Looped = true


musicplayer:Play()

2 comments

0

Did the Audio play at all? Did you leave the Studio while it was playing? Was there any errors? These questions are important. As you may not have known, Line 10 is NOT necessary! 'Instance.new' has a second, optional Argument! Also, getting the Model from the Workspace is not necessary, and is not needed, get the Model from it's Variable!

0

Isn't there a loop setting on the sound object? This isn't even a scripting question.

1 answer

Sounds have a loop property. Just toggle it to true before playing them.

1 comment

0

He did that in the code already. :P

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