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

How do I make it when someone click a part audio ends?

Asked by 7 years ago

I already got help, for to make it play: https://scriptinghelpers.org/questions/41560/This-is-a-link

So when a player click a part the music that is playing just stops? Like if you click the a part it plays and when you click the other part it stop the music playing! Not all the music only one part.

2 answers

Log in to vote
1
Answered by 7 years ago

If the sound is already playing, you can stop the sound by using:

script.Parent.Sound:Pause() --Change script.Parent.Sound to where the sound is

or,

script.Parent.Sound.Playing = false --Change script.Parent.Sound to where the sound is

or, if you want to stop the sound completely, use

script.Parent.Sound:Stop() --Change script.Parent.Sound to where the sound is
0
Lets call the music part mp and the one that stop the music stp ok ZAZC_Noob 7 — 7y
0
so mp is playing music but the player click the stp part will it make it so that when you click the stp it make the music stop one part from each other? ZAZC_Noob 7 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

You can simply use

script.Parent.Sound.Playing = false

Answer this question