I have a radio in my game and it just plays the sounds in order, I don't think it's too efficient because every time a new sound is played it just waits the amount of time that sound is playing (that I found out) to play the next one. Another problem I have is it plays in order, would there be any way to shuffle the playlist around?
This is my script right now, any feedback on how to make it more efficient would really help!
local radio1 = workspace:WaitForChild("radio1")
local radio = radio1:WaitForChild("HitBox")
local sound1 = radio:WaitForChild("sound1")
local sound2 = radio:WaitForChild("sound2")
local sound3 = radio:WaitForChild("sound3")
local sound4 = radio:WaitForChild("sound4")
local sound5 = radio:WaitForChild("sound5")
local sound6 = radio:WaitForChild("sound6")
local sound7 = radio:WaitForChild("sound7")
local sound8 = radio:WaitForChild("sound8")
while true do
wait(.1)
sound1:Play()
wait(113)
sound1:Stop()
sound2:Play()
wait(125)
sound2:Stop()
sound3:Play()
wait(120)
sound3:Stop()
sound4:Play()
wait(103)
sound4:Stop()
sound5:Play()
wait(120)
sound5:Stop()
sound6:Play()
wait(44)
sound6:Stop()
sound7:Play()
wait(235)
sound7:Stop()
sound8:Play()
wait(125)
sound8:Stop()
end

1 comment
yeah something like that