Please help me I'm trying to make a game where you go in a teleporter and when you enter the teleporter the song stops ( the song starts at spawn) so that's why I really want it to be a different brick so then that if they go in a teleporter they wont have to listen to the same song and I know you can do wait() but I cant predict how long it will take a player to get to the next stage so if someone could help me I would be very thankful :D
You can do that easily, just find the location of your song and do :stop()
1 | script.Parent.Parent.BrickPlayingSong.SoundName:Stop() |
[EDIT] here is a more detailed example script
1 | -- this script is inside the same brick as the song |
2 | function onTouched() |
3 | script.Parent.DjDubstep:Stop() -- the song being stopped |
4 | end |
5 |
6 | script.Parent.Parent.JailButton.Touched:connect(onTouched) --This is the block on the other side of the house! This is not limited to the brick the script is in, but any brick that can be touched! |
If this helped you please accept!
so yogi does that mean I need to name the block that i want to stop it by touching it is called jailbutton and djdubstep is the audio holding the soundid or is it the music block holding the audio