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

How would i fade out music without making everything else in the game wait?

Asked by
Ae_ka 0
7 years ago

So i tried using a simple and easy method:

trackl:Play() wait (15) --how long to wait until it needs to fade out trackl.Volume=0.9 wait(.3) mosik.Volume=0.8 wait(.3)

and so on... but because im using wait it pauses everything in the scripya know..

is there a way to do it without making everything in the script wait?

1 answer

Log in to vote
1
Answered by 7 years ago

Yes there is and the simplest way would be to use Spawn usage example here.

Example only:-

spawn(function()
    trackl:Play() 
    wait (15)
    trackl.Volume=0.9
    wait(.3)
    mosik.Volume=0.8
     wait(.3)
end)

I hope this helps.

0
Thanks it helped! But how do i make the fade smooth? Ae_ka 0 — 7y
Ad

Answer this question