GetPropertyChangedSignal not working

Heres the scripts i have

--Server
        game:GetService("ReplicatedStorage").Remotes.RadioAllEvent.OnServerEvent:Connect(function(Player, Value, Name)
            if not Owner then return end
            RadioPart.SoundPart.Sound.SoundId = "rbxassetid://" .. Value
            SongNameRadio.Text = Name
            RadioPart.SoundPart.Sound:Play()
            wait(0.3)
            game:GetService("ReplicatedStorage").Remotes.PlaybackLoudness:FireClient(Player, RadioPart.SoundPart.Sound)
        end)
    end)
--- Client
game:GetService("ReplicatedStorage").Remotes.PlaybackLoudness.OnClientEvent:Connect(function(Sound)
    Sound:GetPropertyChangedSignal("PlaybackLoudness"):Connect(function()
        if Sound.PlaybackLoudness > 500 then
            game:GetService("ReplicatedStorage").Remotes.PlaybackLoudness:FireServer()
        end
    end)
end)
--- Another part of the server
    game:GetService("ReplicatedStorage").Remotes.PlaybackLoudness.OnServerEvent:Connect(function(Player)
        SongNameRadio.Text = "Playing Nothing"
        RadioPart.SoundPart.Sound:Stop()
    end)

Once it gets the GetPropertyChangeSignal it stops there it wont do anything. Runservice works but i dont want to use Runservice.

Why do you not want to use RunService though?
Also you should probably disconnect the event after the sound has been detected as loud.

Because i have a apartment system and it would use a bunch of Heartbeat’s and i dont want any lag.

Have you tried print debugging?

Sorry this is so late but yes. I have tried.

Which line on the code have it stopped at?

Line 2 of the Localscript. It just doesnt wanna seem to send anything or just work at all

Like at the Top The GetPropertChangedSignal isnt firing once it changes. Ive tried to even print the PlaybackLoudness and that doesnt print.

The event only fires when the value of that property is changed. But since you inserted it with a specified value, it will not be fired until it’s changed.

For instance, Ive insert a sound which has 500 PlaybackLoudness. After a while, I connect it to the event. It doesn’t fire because the value is still the same.

So how would i check with GetPropertyChange to detect if the Loudness was above 500?

Your script currently only works if the audio was only loud while it was playing and not loud at the start of the audio. I would recommended just use RunService to constantly check the loudness. It will not cause any performance issues.

Even if there were 20 of them?

All of them will depend on the server’s stability. If the server is bad, then all events will be bad. If it’s stable, then everything is stable.

Using :GetPropertyChangedSignal("PlaybackLoudness") would’ve been worse than using RenderStepped or Heartbeat anyway. Sounds aren’t ‘rendered’ in Lua, they are ‘rendered’ in the engine, a sound would have that event fire every time even less than a frame. It wouldn’t work. Audio updates a lot more than frames. Lua would get stuck easily.

Using RenderStepped or Heartbeat is what you would want here. You want it to update every frame, not everytime the volume slightly changes. After-all, they will only be able to see the update once the frame loads up.

If you’re really worried about performance, then just :Disconnect the connection once it’s not needed anymore and you’re fine.