local main = script.Parent:WaitForChild("Main")
local sound = script.Parent:WaitForChild("Sound")
local songs = {2183613911,615938297,454187551,633495936,1324725994}
local progress = main:FindFirstChild("progress").bar
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

1 comment

0

Maybe you can try to use for i loop to set all clients sound to be the same in the server?