When you first join, it plays random music, which is nice, but if the player doesnt like it, they can skip the music which I added it at the bottom. The thing is it doesn't work. I've tried soundObject.Ended:Wait(), soundObject.Stop(), both doesn't work either.
Where is this script located? It is located in ReplicatedFirst and the sound is parented in the Local Script.
local soundIds = {1178506899, 6549839923, 1271178762} --BlendS, FushqYeah!, Highlight
local soundObject = script.Sound
local lastMusicId = soundIds[1]
while true do
local playingMusicId = soundIds[math.random(1, #soundIds)]
print(playingMusicId)
if playingMusicId == lastMusicId then
repeat playingMusicId = soundIds[math.random(1, #soundIds)] wait(1) until playingMusicId~= lastMusicId
print(playingMusicId)
lastMusicId = playingMusicId
else
soundObject.SoundId = "rbxassetid://" .. playingMusicId
soundObject:Play()
soundObject.Ended:Wait()
end
end
local SkipButton = script.Parent.Parent.StarterGui.FiestaGui.Setting.Frame.SkipButton
SkipButton.MouseButton1Click:Connect(function()
soundObject.Playing = false
end)

1 comment
Give me about 30 minutes. I'll see what I can do. It's not as simple.