Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Music visualizer doesn't work in server ?

Asked by
LeadRDRK 437 Moderation Voter
7 years ago
Edited 7 years ago

This is a server script that controls the visualizer. It works in studio, but in a server it only plays the music. Help ?

01local visualizer = script.Parent.Parent
02local div = script.base_divisor.Value
03local song = nil
04local songInfoGui = visualizer.box.songPlaying.SurfaceGui
05 
06function pickSong()
07    math.randomseed(tick()*math.random()) math.random()
08    song = visualizer.list.emit:GetChildren()[math.random(#visualizer.list.emit:GetChildren())]
09end
10 
11function main()
12    pickSong()
13    song:Play()
14    local Asset = game:GetService("MarketplaceService"):GetProductInfo(string.sub(song.SoundId, 14))
15    songInfoGui.songName.Text = "Playing : " .. Asset.Name
View all 29 lines...
0
You will need to use the run service for this kind of task. User#5423 17 — 7y
0
How do you do that ? If you know how to, post the fixed version of the script please. LeadRDRK 437 — 7y

Answer this question