I'm trying to make a script that is basically a playlist, but nothing happens. Here is the script.
while true do script.Parent.Music1:Play() wait(76) script.Parent.Music1:Stop() wait(0.1) script.Parent.Music2:Play() wait(61) script.Parent.Music2:Stop() wait(0.1) script.Parent.Music3:Play() wait(139) script.Parent.Music3:Stop() wait(5)
I have checked output, and all it says is that is: SoundService:PlayLocalSound only works on a client. How do I fix this?
Start by creating a local script inside of StarterGui. Then, drag and drop all of the music inside of the script. Inside of the script, you can copy and paste this.
while true do script.Music1:Play() repeat wait() until not script.Music1.IsPlaying script.Music2:Play() repeat wait() until not script.Music2.IsPlaying script.Music3:Play() repeat wait() until not script.Music3.IsPlaying end
One of the reasons that your script may not be working is that you forgot to place an end for the 'while true do'. Using the 'IsPlaying' property of a sound, we can detect whether or not it is playing. Once the sound is finished, the 'IsPlaying' property of it is false. The script I've given you plays the music, detects when it has finished and plays the next one. It will repeat this playlist forever.