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

Simple music script not firing?

Asked by 8 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

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

One player game by the way.

Any ideas why it's not working?

0
Uh, there a couple of reasons. Try placing the sound in workspace, and remove the first and 3 line. Place the script in the sound and see if that work. Kurieita 125 — 8y

1 answer

Log in to vote
0
Answered by
rexbit 707 Moderation Voter
8 years ago

Using PlayerAdded in a Localscript will NOT work, PlayerAdded will only work in a Script.

script.StartMusic:Play()
Ad

Answer this question