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

Simple music script?

I'm making a start up menu for a game, it's supposed to play music when you see it. Except it won't play.

This is in a local script. This script is in StarterGUI

1
game.Players.PlayerAdded:connect(function()
2
    script.StartMusic:Play()
3
end)

One player game by the way.

Any ideas why it's not working?

1 answer

If it's only a one player game, you don't need to do the game.Players.PlayerAdded function. Simply play the music with

script.StartMusic:Play()

Otherwise, make sure the volume is at 1 and the pitch at 1, make sure the soundId is valid. (Should look like:)

"rbxassetid://0000000" -- 0's being the ID, you make sure this is what it looks like in properties.

1 comment

0

Also keep in mind that playerAdded does not work in localscripts.

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