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

why won't Stopped:wait() trigger?

Asked by
Vezious 310 Moderation Voter
8 years ago

Where .Stopped:wait() is
("Ended" is never printed, but "I'm waiting for end" does)

while true do
RoundReset()
wait(3)
if not MusicQueue[1] then --If No Chosen Music

local Code = math.random(1,#MusicCodes)
Play(MusicCodes[Code],"Console")
print"i'm waiting for end"
game.Workspace.Speaker.Sound.Stopped:wait() 
print"ended"

What stops the music (All the things in the function runs perfectly)

function RateChanged()
Speaker.Sound.Volume = .6+(Rating*.05)
if RequiredRaters <= Rating*-1 then
for i=Speaker.Sound.Volume,0,-.02 do
wait(.1)
Speaker.Sound.Volume = i
end
game.Workspace.Speaker.Sound:Stop()
end
end

What's wrong?

0
Never mind. I hate sounds. .Stopped don't work on server side. Vezious 310 — 8y
0
There's a event where it'll fire when the music has stopped. E.X: Music.Ended:connect(function() legosweat 334 — 8y

Answer this question