How can I make it play both of these songs? This script is for the lights to match the beat of it and only the second one in sound works.
local sound = workspace.Songs.TexasSong and workspace.Songs.ClemsonSong
local lastsound
local max = 0
local min = 0
local neon = {}
for i, v in pairs(workspace:GetDescendants()) do
if v:IsA('BasePart') and v.Material == Enum.Material.Neon and v.Name ~= "NOCOLOR" then
table.insert(neon,{v, v.Color})
end
end
local function createNewValue(howloud,max,min,colorMax,colorMin)
local newValue = (((howloud - min) * (colorMax - colorMin)) / (max - min)) + colorMin
return newValue
end
spawn(function()
game:GetService('RunService').RenderStepped:Connect(function()
if lastsound then
if sound.SoundId ~= lastsound then
max = 0
min = 0
end
end
lastsound = sound.SoundId
local howloud = sound.PlaybackLoudness
if howloud > max then
max = howloud
elseif howloud < min then
min = howloud
end
for i, v in pairs(neon) do
local RGB = Color3.new(createNewValue(howloud, max, min, v[2].R, 0), createNewValue(howloud, max, min, v[2].G, 0), createNewValue(howloud, max, min, v[2].B, 0))
v[1].Color = RGB
end
end)
end)