How would I change this visualizer script from the size of the part to instead the color of the part?

Hi there, I followed this tutorial online on how to make a visualizer that changes a ball’s size based on the objectvalue of a sound (which I’m assuming is the loudness), and it is involved with deltatime and it is incredibly smooth. I just wanna find a way if it’s possible to change this so that it changes the color instead since by how smooth it is.

local rs = game:GetService("RunService")
local ball = workspace.ball

ball.CanCollide = false

local musicValue = script:WaitForChild("Value")

local function vs(dt)
	local l  = musicValue.Value.PlaybackLoudness * .04
	ball.Size = ball.Size:Lerp(Vector3.new(l,l,l),1-(0.1)^dt)
end

rs.Heartbeat:Connect(vs)

Just lerp the ball’s Color instead of Size

You would probably need to mess around with the sensitivity because the values you pass to Color3.new should typically be between 0 and 1

How would I change the sensitivity?

Also, if I were to do this with HSV since it’s easier, how would I do?

PlaybackLoudness is between 0 and 1000 so you need to divide “l” by 1000 (or a smaller number cuz not all songs are gonna even reach like 500 PlaybackLoudness)

Depends on how you want the color to change lol. Fade one color to another? Cycle thru colors? Or maybe something else even?