Hi there, I followed a tutorial online and modified the script so that the colour ranges instead of just changing between two, however the issue is that it changes at the start of the music and then stops. I don’t really have an attempt apart from changing brickcolor to color3.fromrgb.
game:GetService("RunService").RenderStepped:Connect(function()
local part = script.Parent
local loudness = workspace.Sound.PlaybackLoudness
if loudness >= 100 then
part.Material = "Neon"
part.Color = Color3.fromRGB(9, 137, 207)
else
part.Material = "Neon"
part.Color = Color3.fromRGB(4, 175, 236)
end
end)
But then others wouldn’t hear the sound of my randomized playlist. I have other scripts that use playbackloudness in a local script, and read of a sound plays off the server
Try the RenderStepped version above with the sound being played from a server script. I’ve added a print command which should display the value of the property every frame/every time RenderStepped is fired.
I know what you mean, I’ve seen it before, PlaybackLoudness is an awkward property to work with (because it changes so frequently often multiple times per frame). So for performance reasons Roblox doesn’t seem to allow .Changed/:GetPropertyChangedSignal() to work in relation with it.