Forja

Roblox background music script

A song that loops for each player while they play.

Where it goes

  1. 1Find a sound in Studio's Toolbox, under Audio, right-click it and copy its asset ID.
  2. 2In the Explorer, open StarterPlayer, hover over StarterPlayerScripts, press + and choose LocalScript.
  3. 3Delete what's in it, paste this in, put your ID in AUDIO_ID and press Play.
BackgroundMusic · a LocalScript in StarterPlayer > StarterPlayerScripts
-- From forja.us/tools/roblox-scripts/background-music-- Plays a song on a loop for this player.local SoundService = game:GetService("SoundService")local AUDIO_ID = 0 -- your audio's idlocal music = Instance.new("Sound")music.SoundId = "rbxassetid://" .. AUDIO_IDmusic.Looped = truemusic.Volume = 0.5music.Parent = SoundServicemusic:Play()

How it works

  • It's a LocalScript, so each player has their own copy of the music, and can have their own volume.
  • Looped starts the song again when it ends.
  • Audio must be allowed in your game. If it stays silent, check the Output window for a permission message.

Make it yours

Quieter
Change Volume: 0 is silent and 1 is full.
Want something more? The script generator can write it: “Background music with a mute button, that changes song when the player enters a different zone”

Maps to try it on: lobby maps

Start from a finished map, and your scripts have a game to run in.

More free Roblox scripts