What I want this script to do, is that a new song is played every 130 seconds. But there actually are 2+ sounds playing at the same time?? Can anyone help me fix this please? The songs are NOT looped.
1 | while true do |
2 | songs = script.Parent.Radio:GetChildren() |
3 | playsong = math.random( 1 ,#songs) |
4 | songs [ playsong ] :Play() |
5 | wait( 130 ) |
6 | end |
1 | while true do |
2 | songs = script.Parent.Radio:GetChildren() |
3 | playsong = math.random( 1 ,#songs) |
4 | songs [ playsong ] :Play() |
5 | wait( 130 ) |
6 | songs [ playsong ] :Stop() |
7 | end |
Well for one u have a 'while true do' so it will loop continually. Even though it waits 130 seconds the song might be longer then that so it will overlap with another song thats playing