local main = script.Parent:WaitForChild("Main")
local sound = script.Parent:WaitForChild("Sound")
local songs = {427708534,4562607779,2808231858,296686470,454187551,633495936,469876597,896788607,1324725994,657284150}
local progress = main:FindFirstChild("ProgressBar").Progress
local songName = main:FindFirstChild("SongName")

while wait() do
    sound:Stop()
    progress.Size = UDim2.new(0,0,1,0)
    if not sound.IsPlaying then
        local songChosen = songs[math.random(1,#songs)]
        local asset = game.MarketplaceService:GetProductInfo(songChosen)
        sound.SoundId = "rbxassetid://".. songChosen
        sound:Play()
        songName.Text = asset.Name
        wait(1)
        progress:TweenSize(UDim2.new(1,0,1,0),'Out','Linear',(sound.TimeLength)-1)
        wait((sound.TimeLength)-1)
    end
end

Here is my explorer: https://prnt.sc/rgism6

Here is the UI: https://prnt.sc/rgisq7

Just wanted to mention, when I test in studio it works fine.

6 comments

0

Is team create enabled on the area you are creating the script?

0

On my game, team create is enabled.

1

Oh its an easy fix. Roblox added a new thing to team create know as drafts. Which means scripts may be modified but unless you commit the draft in the draft window it wont take affect in the online servers on studio.

0

Erm, thank you.

0

So how do I fix that?

0

Nevermind.