I am trying to add background music to my game, which seems like it should be an easy task.
This is the current workflow, as far as I can tell (because it is not documented in the wiki):
Go to DEVELOP page on the WEBSITE.
Upload sound
Get the AssetID for the sound
Open Studio
Go to Model → Advanced Objects → Sound
Set the SoundID in the Sound to the AssetID you copied before
Go to Model → LocalScript
Put a local script in the StarterGui (where else?!)
Write code to make the sound play when the script runs which will happen whenever the character spawns
This is awful.
I’ve also noticed that if you somehow manage to find the sound library in Studio (by dark magic) and point your Studio browser to an asset like https://www.roblox.com/Spitfire-item?id=129490596, the Play buttons do not work in Studio. So I have to go to the website to browse sounds I might want to add to my game.
Proposal:
Make sound upload work like image upload from Studio (actually make it better, because I should be able to upload a sound from the SoundID property in property manager).
Create a BackgroundMusic service. Let me put folders in there. Make a property: BackgroundMusicService.CurrentFolder. Automatically shuffle the sounds in this folder as a playlist.
I agree the process should be more straightforward. There are a lot of casual builders who just want to add some simple background music to their game, but they have no idea how to do all of this. Background music is probably one of the most frequent things I get asked how to do.
Can’t say I agree with the idea of a BackgroundMusicService, the rest of it however is on point. What I would say is perhaps a folder within SoundService called BackgroundSounds or something of the sort may be a better idea.
Yes, agreed. Also you can put local scripts in PlayerScripts which won’t reset each time the player dies. So that’s one less issue, but the other points are valid.
I am not sure how it works currently, but at one point every time the play died you needed to manually restart the background music. Is that still true?
ResetPlayerGuiOnSpawn was a big deal. Not sure it got a blog post.
PlayerScripts was an even bigger deal because of custom camera/movement controls and as a persistent local container.
I can’t find these mentioned on the blog. They were probably only mentioned briefly in a stream. I found these out when they were added because of the Changelog and the dev forum.
Would be convenient if these 2 pages had the info mentioned on this thread: