Tween Works in Studio, but not in Game

I made this script to make a speaker vibrate when a loud sound is played. It works in studio but not in game. The PlaybackLoudness is constantly printing 0 in game.

local RS = game:GetService("RunService")
local TS = game:GetService("TweenService")
local One = script.Parent.Parent.Woof1
local Two = script.Parent.Parent.Woof2
local Sound = script.Parent.ClubMusic
local PrevVol = Sound.PlaybackLoudness

local Info = TweenInfo.new(
	.1,
	Enum.EasingStyle.Quart,
	Enum.EasingDirection.Out,
	0,
	true,
	0
)

local Goal = {}
Goal.Size = Vector3.new(0.125, 1.75, 1.75)

local Tween1 = TS:Create(One, Info, Goal)
local Tween2 = TS:Create(Two, Info, Goal)

RS.Heartbeat:Connect(function()
	print(Sound.PlaybackLoudness)
	if Sound.PlaybackLoudness - PrevVol > 200 then
		Tween1:Play()
		Tween2:Play()
	end
	PrevVol = Sound.PlaybackLoudness
end)

This script isn’t changing the playback loudness, this is just reading the value which I assume is changed in another script.

It’s not supposed to change it. It’s supposed to make the speaker vibrate.

Where is the script? local or server?

If its being done via server it will have issues detecting loudness

So, I have to use a local script?

I was asking where is the script located either locally (like workspace or player’s gui) or server (in server script service)

refer to this post:

Okay, thanks. I didn’t know you couldn’t use PlaybackLoudness on the server.