I'm making a Tycoon and I have made a leaderstat that is called 'Cash'. I'm trying to make a Gui that shows the amount of cash you have but I can't figure out how to do it. Please give a solution because everything I'm doing isn't working.
Make a localscript inside the gui, and change the text to the value of 'Cash' everytime the value changes
example script :
1 | local player = game.Players.LocalPlayer |
2 | local Cash = player:WaitForChild( "leaderstats" ):WaitForChild( "Cash" ) |
3 |
4 | Cash.Changed:connect( function () |
5 | script.Parent.Text = Cash.Value |
6 | end ) |