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

Playing Sounds From Script?

Asked by 9 years ago

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?

0
Try putting the sound into the Workspace Scootakip 299 — 9y
0
I'll try. fight4moneyalt2 27 — 9y
0
Thank you! fight4moneyalt2 27 — 9y

2 answers

Log in to vote
1
Answered by 9 years ago

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.

Ad
Log in to vote
-2
Answered by 9 years ago

It should work if you do it from workspace like

game.Workspace."Sounds name":Play()
0
This would not work. It would be game.Workspace.Fail:Play() fight4moneyalt2 27 — 9y
0
Thats what I mean just about exactly but you just added fail. michaelbuck123 0 — 9y

Answer this question