I want that when the player buys a thing and his money get deducted at the time it gets deducted I want the text label to show his money as it get deducted but my script dosent it keeps the value as it was the first time the player joined it dosent work can someone help me?
local Money = script.Parent.Menu.Money local plr = game.Players.LocalPlayer local Gold = plr.leaderstats.Gold.Value Gold.Changed:Connect(function() Money.Text = "Gold: "..Gold end)
You can use the GetPropertyChangedSygnal()
function for it. Here you go:
local Money = script.Parent.Menu.Money local plr = game.Players.LocalPlayer local Gold = plr.leaderstats.Gold Gold:GetPropertyChangedSygnal("Value"):Connect(function() Money.Text = "Gold: "..tostring(Gold.Value) end)