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

Playing Sounds From Script?

I am playing 2 sounds from SoundScape, called Fail And Victory. When I run

game.Soundscape.Victory:Play()

From the command line, it works and I can here the sound. This doesn't work in test server mode, or in game (while in a script.) Help?

3 comments

0

Try putting the sound into the Workspace

0

I'll try.

0

Thank you!

2 answers

✓ Accepted answer

This is a bit more complicated then you were expecting, but it allows you to make other scripts that can tie into this;

Toggle = script.Toggle
Victory = game.Soundscape.Victory

Victory.Parent = game.Workspace
if Toggle.Value == 1 then --Change this to whatever your NumberValue is, and it'll work
wait(1)
Victory:Play()
end

After making the script with this code, insert a 'NumberValue' into the script and then change the number to whatever you want. If you have questions, reply to this.

It should work if you do it from workspace like

game.Workspace."Sounds name":Play()

2 comments

0

This would not work. It would be game.Workspace.Fail:Play()

0

Thats what I mean just about exactly but you just added fail.

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