-- Watch for newly playing tracks in workspace.Music, change script.Parent.MusicName to the Sound's name
-- When script.Parent.TextBox is changed, change the volume of all children of workspace.Music


MusicUI = script.Parent

MusicUI.TextBox.FocusLost:Connect(function()
	for i,v in pairs(workspace.Music:GetChildren()) do
		v.Volume = MusicUI.TextBox.Text
	end
end)

for _,Sound in pairs(workspace.Music:GetChildren()) do
	Sound:GetPropertyChangedSignal("Playing"):Connect(function()
		if Sound.Playing == true then
			MusicUI.MusicName.Text = Sound.Name
		end
	end)
end
