Music won't play when value changes

I’m trying to get music playing locally for players depending on their stage leaderstats, here is a test script I made for this in StarterGui. When I go to the next stage I don’t get any errors yet nothing happens

Here’s the code

if game.Players.LocalPlayer.leaderstats.Stage.Value == 2 then
	game.Workspace.Music.Stage1:Stop()
end
1 Like

use :GetPropertyChangedSignal() since it wont detect if the value was changed

do this:

game.Players.LocalPlayer.leaderstats.Stage:GetPropertyChangedSignal("Value"):Connect(function()
   if game.Players.LocalPlayer.leaderstats.Stage.Value == 2 then
	   game.Workspace.Music.Stage1:Stop()
   end
end)
1 Like

Alright well this seems to work, thanks