Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make music continuously play, automatically?

Asked by 9 years ago

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

2 answers

Log in to vote
0
Answered by 9 years ago

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! :)

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? Vailliance 5 — 9y
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. RedneckBane 100 — 9y
Ad
Log in to vote
-1
Answered by
bloxxyz 274 Moderation Voter
9 years ago

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

game.Workspace.SoundNameHere:Loop()

Answer this question