Hello there, I have a club floor visualizers that pulses through colors using lerp and playbackloudness. The issue here, is that it isn’t smoothing transitioning between RGB to the target color. I’ve tried adding clamping a difference between each color but still can’t seem to get it properly smooth for each song. I’ve also used a compressor sound effect to balance the loudness for each song too, however that didn’t fix it completely.
See script below video:
local ColorSilent = Color3.fromRGB(0, 0, 0)
local ColorLoud = Color3.fromRGB(10, 162, 243)
rs.Heartbeat:Connect(function()
if on then
local difference = (sound.PlaybackLoudness / 2.2) - lastSoundLevel
difference /= 100
difference = math.clamp(difference,0.62,1)
local loudness = sound.PlaybackLoudness / 350
local change = ColorSilent:Lerp(ColorLoud,difference)
floor.Color = change
pillar1.Color = change
pillar2.Color = change
pillar3.Color = change
pillar4.Color = change
end
end)