Trying to make a song play when a player joins, and stop playing when they click text button "Play"

wait, the script or the local script?

The local script. The server script can go in workspace or serverscriptservice. Open up your output and see if there are any errors

no errors. all scripts in the right place.

Hmm, my only fix would be to remove the first playeradded function in your script, as that seems to have no purpose. Keep the second one though, and see if that fixes the problem. Also, is it not playing the sound, or not stopping the sound?

not stopping
awsrvgygygygygyghyy

here is the removed player added function thing
this


to this

Yeah, test that out and see if it works

nope. big sad.
aaaaaaaaaaaaaaaaaaaa

Okay there are two options that we got here. We can either make the sound local and see if that works. (This will make it so that only the person that joined can here the sound)

Or we can shut off the sound for everyone by pressing the button.

You choose as I am not completely sure which one would be best suited for your game

I want the player to join the game, and to be in a main menu screen, with three buttons. Play, store, and about.

I want the music to start while they are loading into the game, which it is. I then want the music to stop when they click play.

this is not working, as it just keeps playing.

i just noticed that even if my Title screen gui (which these three buttons are in, and the local script is in the play button) is disabled, the music plays anyway. I don’t know if that means anything though lol.

i like the first option. i think that makes sense.

Sorry for the delayed response, I was just testing everything out in studio. I replicated the scripts that you have, and when I join it plays the sound(like it should.) But when I click the button, the sound stops. I don’t see why this shouldn’t work, unless you might be getting “Title Screen is not a valid member of PlayerGui”?

ok this is epic.

here are my guis.
Screen Shot 2020-06-20 at 8.39.16 PM
“Button” is the play button. the local script that is a child of that is the local script we made.

could you publish that and link it here so i can get it? maybe im just missing something…

Audio_Stopper.rbxl (20.9 KB)
This is the place that I recreated it on.

1 Like

lol??
no wonder it didn’t work, i just saw your script and i was thrown for a loop. yours is so simple.

heres mine

aghhhhhhh

inb4 this gets sniped for the bruh above

I mean, yours just adds a name to the sound, and it uses GetService, which shouldn’t affect how it all works. I don’t know it’s just so weird.

1 Like

BRUH IT WORKED LMAO THANK YOU SO MUCH

reply with something ridiculous like lyrics of “never gonna give you up” and ill mark it as solution for giggles.

idk im just having to babble because this would be marked as incomplete sentance.

1 Like

Lmao, yeah no problem. Glad that I could help you out with this :slight_smile:

1 Like