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

Why Wont This Work?

Asked by 9 years ago

Well, be prepared to cry, Im a total beginner! Why wont this music script work!?

game.Workspace.Sound:Play(154007104)
    end
end

(this is in a local script)

2 answers

Log in to vote
1
Answered by 9 years ago

If you wish to play the sound you should have something like this. local Sound = game.Workspace["SoundName"] Sound:Play()

If you want to create a sound with an Id do this. local Sound = Instance.new("Sound", game.Workspace) Sound.SoundId = IDHere Sound:Play()

Ad
Log in to vote
0
Answered by 9 years ago

Use this:

sound = game.Workspace.Sound
sound:Play()

You do not need to put the IDs in. To have the song loop, just enable the " loop " button on the sound in Workspace.

Note: This works in a normal script

Answer this question