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

How would I create a gui to stop sound but keep it playing while it's off?

Asked by 8 years ago

So, I have all the gui thing's, everything needed, all the way until I reached that button that you need to click to turn off the song. So I have a script to play the music, but I want it to keep playing while it's off, sort of like a radio. So, here's exactly what I want to play out

  1. The song is playing
  2. The player click's the button
  3. The song is still playing
  4. When the player click's it again, it's still playing

What i don't want to play out

  1. The song is playing
  2. The player click's the button and the song is muted
  3. The song stop's playing
  4. When the player click's it again, it starts from the beginning.

So, here's what I was thinking about this script, but I couldn't get my finger on it.

I know I need to use TimePosition, because I want it to play at the point in the song where it was playing, and I also know that the button need's to do something to, so I was thinking that the song would have to be muted somehow, like turning the song volume, which I am a bit confused about because I don't know that much, is there a function to lower the volume of a song?

So here's everything I did:

The GUI button is called A The GUI itself is called B The script for the music to play in the GUI is called C I put the Item to click the button in the Gui button so it is clickable The script I put in the GUI button is called D

That's where I'm at now.

But, is there anything I'm wrong about in my ideas above, like using Time Position and, what is that function to mute the volume, can you show me what I need to do?

0
Sound.Volume = 0 Validark 1580 — 8y

Answer this question