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

How do I make music continuously play, automatically?

Like when you join the game, the music begins playing and I don't have to be in game saying ':music ___________'

2 answers

Here's what I would do. Find your music file, check the box that says "Loop" in the Sound's properties. Then, you would start the music by inserting a server script and adding this line of code:

script.Parent:Play()

If you only wanted the music to play once through, then you would leave the "Loop" box unchecked but still leave the script in it.

Hope this helps! :)

2 comments

0

I have a follow up question, Aceta, do I insert the music file into the game or do I need to script a specific brick?

0

You just insert it into Workspace. With sounds, you don't need to parent it to anything specifically unless you want a sound to be in a specific person's head. For example if you wanted only a single player to have a sound running through their speakers then you would parent the sound to the person's head and then start it through the :Play() function.

I believe you can either manually loop it through properties by selecting the box, or just do the following:

game.Workspace.SoundNameHere:Loop()

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