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

Simple music script?

Asked by 9 years ago

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

Log in to vote
0
Answered by 9 years ago

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.
0
Also keep in mind that playerAdded does not work in localscripts. Molten_Legacy 40 — 9y
Ad

Answer this question