This script is for a opening gui and it plays music. I tried using random math method but it seems to not work at all, or just I'm doing it wrong. What I was trying to make is everytime u join, a new sound plays than the same one previously you joined.
local Sound = script.Sound
local GUI = script:WaitForChild("LoadingScreen")
local plr = game.Players.LocalPlayer
GUI.Parent = plr.PlayerGui
script.Parent:RemoveDefaultLoadingScreen()
repeat
wait(.5)
until game:IsLoaded()
Sound:Play()
Sound.Volume = 1
wait(15)
GUI.Frame:TweenPosition(UDim2.new(0,0,-1.5,0),Enum.EasingDirection.InOut,Enum.EasingStyle.Quad, 1)
wait(1)
Sound.Volume = .9
wait(.25)
Sound.Volume = .8
wait(.25)
Sound.Volume = .7
wait(.25)
Sound.Volume = .6
wait(.25)
Sound.Volume = .5
wait(.25)
Sound.Volume = .4
wait(.25)
Sound.Volume = .3
wait(.25)
Sound.Volume = .2
wait(.25)
Sound.Volume = .1
wait(.25)
Sound.Volume = .05
wait(.25)
Sound.Volume = .025
wait(.25)
Sound.Volume = .01
wait(.25)
Sound:Stop()
GUI:Destroy()

1 comment
i don't see a random math method in the script...