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

How to add to my server music?

Please help me i need to add background music to my server!

4 answers

Problem: You need background music for your game

Solution:

Step 1) Insert "Sound" from "Advanced Objects" into your "Workspace"

Step 2) Insert "http://www.roblox.com/asset?id=IDHERE" into the "Sound" property "SoundId"

Replace IDHERE with Song Id

Step 3) Insert a "Script" from "Advanced Objects" into your "Sound"

Step 4) Put in the script (Below for options):

To play the song:

script.Parent:Play()

To stop the song:

script.Parent:Stop()

To pause the song:

script.Parent:Pause()

3 comments

0

Pause is broken af, use pitch = 0 then pitch = 1

0

This works only one time only at roblox studio :/

0

What do you mean?

local s = Instance.new("Sound")

s.Name = "Sound"
s.SoundId = "http://www.roblox.com/asset/?version=1&id=45819151"
s.Volume = 1
s.Looped = true
s.archivable = false

s.Parent = game.Workspace

wait(3)

s:play()

Just insert this into a normal script and place it in Workspace. Have fun! :)

Insert a script into Workspace with this code inside it:

local music = script.Music
music.Looped = true
music:Play()

Insert a sound into the script, name it "Music", and give it the soundId of the music you want. Done!

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