game.Players:WaitForChild(game.Players.LocalPlayer.Name):WaitForChild("leaderstats"):WaitForChild("Cash").Changed:connect(function() script.Parent.Text = game.Players:WaitForChild(game.Players.LocalPlayer.Name)WaitForChild("leaderstats"):WaitForChild("Cash").Value end)
I think it is like this:
while true do Wait(0.1) script.Parent.Text == game.Players.LocalPlayer:WaitForChild("leaderstats" ):WaitForChild("stat name") end
Here is a little more complex version.
local Plr = game.Players.LocalPlayer --The Player local Stats = Plr.leaderstats --The leaderstats while Stats ~= nil do -- While Stats Is in the game wait() script.Parent.Text = "Cash: "..Stats.Cash.Value.."$" end