How do I make a part change to another colour based off playbackloudness and a sound?

Hi there, I want to make it so my disco floor changes to another colour and back based off playbackloudness. I want it so that when theres a beat, it rapidly changes and goes back. I have this serverscript inside a part however it doesn’t work when being local and since playbackloudness only reads local scripts, it’s hard.

local TweenService = game:GetService("TweenService")
local part = script.Parent
local TweeningInformation = TweenInfo.new(
	2,
	Enum.EasingStyle.Quad,
	Enum.EasingDirection.Out,
	753475938457843579348573,
	true,
	0
)

local PartProperties = {
	Color = Color3.fromRGB(33, 84, 185)
}

local Tween = TweenService:Create(part,TweeningInformation,PartProperties)
Tween:Play()
friendly suggestion :)

Quite the large number. I believe -1 yields the same result. ( loop forever )

2 Likes

thanks for the suggestion, do you still know an answer to my original question?