Updating PlayerGUI only when leaderstat changes

Hi,

What is the best way of updating a player GUI only when a leaderstat changes?

I normally just put the gui update in a wait but this does not great.

Thanks

I’m pretty sure you can use this function to detect when a leaderstat changes it’s value?

You can use this in a local script:

local plr = game.Players.LocalPlayer

plr.leaderstats.ValueName.Changed:Connect(function())
       --change the gui here
end)
1 Like