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
COMMUNITY QUESTION
How would I make this script work at a Server Script? Works as local script.
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

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