|
This script should run fine, I've tried every conceivable way to make the sound stop...It has no problem creating a new sound, but the old one will not stop. It just continues to pile sounds on top of one another. (The song title updates just fine as well) Any help would be appreciated.
Here is the script in full. Please disregard the redundancy in the first few lines; as i said, I tried every conceivable function...
function onClicked()
--RBC
game.Workspace.Music:Stop()
game.Workspace.Music.Pitch = 0
game.Workspace.Music.Volume = 0
game.Workspace.Music:Destroy()
local m = Instance.new("Sound",game.Workspace)
m.Name = "Music"
game.Workspace.DJFramework.IsCustomPlaylist.Value = false
script.Parent.text.ab.TextColor3 = Color3.new(255,0,0)
game.Workspace.customplaylist.text.ab.TextColor3 = Color3.new(255,255,255)
local arr = {165761285,151692337,142381976,149387833,145980501,143201502,157571763,151224582,157765161,
160348174,164828468,143782800,162898749,148201729,143648129,166562385,157081108,142534326,
149803162}
local names = {"Luna","Around the world","Robot rock","Of Storms","Breaking a sweat","Alive","Takillya","Ease my mind",
"Bundem","Inforthekill","Pro griefers","Can't stop","Stranger","Holdin' on","Mint","Sandstorm","Ghosts n' Stuff",
"Pendulum Propane Nightmares","The Scientist"}
local x = math.random(1,#arr)
game.Workspace.Music.SoundId = "http://www.roblox.com/asset?id="..arr[x]
game.Workspace.songName.SurfaceGui.PLAYING.Text = names[x]
game.Workspace.Music:Play()
end
script.Parent.ClickDetector.MouseClick:connect (onClicked) |