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

How would i add music in a game?

Asked by 10 years ago

How would i add music in a game

3 answers

Log in to vote
0
Answered by 10 years ago

In studio, go to Insert - Basic Objects - Sound. Then edit to sound ID

Ad
Log in to vote
0
Answered by 10 years ago

In Studio, right click Workspace, click insert basic object, and click sound. Find the ID of the sound you want to use (The numbers at the end of the link for the sound) then, go into the Properties of the sound and where it says Sound Id type in http://www.roblox.com/asset/?id={Type in the Id you found earlier here} Finally, insert a LocalScript in Starter GUI. In the Local Script, type in

Game.Workspace.Sound:Play()

If you renamed the sound something different, instead of writing sound obviously you would write whatever you called the sound. MAKE SURE THE LOCAL SCRIPT IS IN STARTER GUI!!! Hope it works! Please accept my answer if it does!

Log in to vote
0
Answered by 10 years ago

Try this put this in workspace and make it a script

local s = Instance.new("Sound")

s.Name = "NameOfYourMusic"
s.Pitch = 1.2
s.SoundId = "http://www.roblox.com/asset/?version=1&id=MusicID"
s.Volume = 0.5
s.Looped = true
s.archivable = false

s.Parent = game.Workspace

wait(5)

s:play()

Answer this question